I've no idea what happened, but I've started getting this error:
c:\Sites\Project>ruby bin/rails server
Your bundle is locked to rake (12.0.0), but that version could not be found in any of the sources listed in your Gemfile.
If you haven't changed sources, that means the author of rake (12.0.0) has removed it.
You'll need to update your bundle to a different version of rake (12.0.0) that hasn't been removed in order to install.
Run `bundle install` to install missing gems.
I've been using railsinstaller 2.3, and after getting it switched over to 2.2, but it is not helping.
Running bundle install produces exact same error text.
Ran
gem install rubygems-bundler
gem regenerate_binstubs
then
bundle install
Related
I get the following error message when starting the rails server:
Your bundle is locked to rake (12.0.0), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of rake (12.0.0) has removed it. You'll need to update your bundle to a different version of rake (12.0.0) that hasn't been removed in order to install.
I specified gem 'rake', '12.0.0' in the gemfile but that doesn't fix it. I tried bundle update rake, deleting the Gemfile.lock and generating it with bundle exec bundle install. I also prepended `bundle exec1 to al my commands which does nothing.
My Gemfile.lock already specifies rake version 12.0.0, and there are no other versions installed.
See my gemfile:
http://pastebin.com/L4tVFWz9
And rakefile:
http://pastebin.com/K7p2ajsE
I tried the solutions suggested in Already activated rake version different than what Gemfile requires prevents rake commands
Different methods to solve this issue,
Step1:
gem install rubygems-bundler
gem regenerate_binstubs
Step2:
Remove the vendor/bundle directory.
Run bundle install to rebuild it
Step3:
Try, gem update bundler
Here is a link where the issue got solved. Check this is very useful
Try:
gem install rubygems-bundler
gem regenerate_binstubs
Not really a fundamental solution, but if you really have to run some Rails commands urgently and needs a temporary fix, try bundle exec rails c rather than bin/rails c.
Enter command :-
bundle update rake
Here is a trouble: on my remote server command gem list shows:
some gems
minitest (4.7.5)
....
bundle show minitest command shows:
/var/lib/gems/1.9.1/gems/minitest-4.7.5
bundle show rails shows the same directory
bundle -v - 1.6.2 (the latest version)
But I've an error: Could not find minitest-4.7.5 in any of the sources (Bundler::GemNotFound)
The steps I've made
Delete Gemfile.lock and bundle install again
Reinstall bundler
Ruby version 2.1.2
Bundle install output shows Using minitest (4.7.5)
On the remote server run gem update bundler and after bundle install.
I think maybe the gems you installed system-wide cause the problem.
You may try bundle package locally, and commit the gems generated in vendor/cache. Pull it on server, and try bundle install —local.
Or, you may just use bundle install --path=vendor/bundle on server.
Give it a try, and hope this can help.
I just added rspec but get a bundler conflict when I try and run the specs, this does not happen if I run rake tasks or start the server.
bundle exec spec
/<snip>/gems/bundler-1.0.21/lib/bundler/resolver.rb:280:in `resolve': You have requested: (Bundler::GemNotFound)
nokogiri >= 0
The bundle currently has nokogiri locked at 1.5.0.
Try running `bundle update nokogiri`
I've tried running bundle update nokogiri and removing Gemfile.lock and rerunning bundle install. I've even tried rvm gemset empty and starting afresh.
Gemfile: https://gist.github.com/1342979
Gemfile.lock: https://gist.github.com/1342981
JRuby: 1.6.2
Rails: 3.0.10
Bundler: 1.0.21
It seems running rspec instead of spec works...
While creating creating an integration test via rails generate integration_test foo it declined with
Could not find ffi-1.0.9 in any of the sources
Run `bundle install` to install missing gems.
I ran bundle install to install missing gems, but with no success. Still the same error. I have gem 'ffi' in my Gemfile.
I switched the gemfile line to gem 'ffi', :git => 'git://github.com/ffi/ffi.git' and bundle installed again. It did all sort of stuff and wrote "Your bundle is complete" at the end.
However when I run the rails generate... command again I get:
git://github.com/ffi/ffi.git (at master) is not checked out. Please run 'bundle install'
What the hell is going on with this ffi?
I ran into the same problem and solved it by removing the Gemfile.lock and re-run bundle install.
Perhaps try 'bundle exec rails generate...'
bundle install was failing because it could ffi failed with NoMethodError for spec.
Removing Gemfile.lock, empty the gemset and doing bundle install worked.
After pulling my application, I noticed I had to run bundle install (I'm using rails 3 and ruby 1.9 at Ubuntu 10.10).
Bundler indicated a gem conflict and told me to bundle update. After that, my application broke giving me the following error:
https://gist.github.com/979975
At config/environment.rb:5, I only have
TopTal::Application.initialize!
I reinstalled rvm, ruby, ran bundle install again but the error still appears here. Does anyone have any idea?
Be careful with "bundle update"! When you ran it, bundler ignored the previously installed gems in Gemfile.lock and updated many or all of your gems. I suggest you revert your Gemfile and Gemfile.lock back to before you did the update and try bundle install again. Note the gem with the conflict and then do "bundle update gem_name". This should update only the gem with the problem.