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.
Related
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
I was developing an app of mine where when I try to run rails c, it leads to this error:
Your bundle is locked to CFPropertyList (2.3.4), 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 CFPropertyList (2.3.4)
has removed it.
You'll need to update your bundle to a different version of CFPropertyList (2.3.4)
that hasn't been removed in order to install.
Run bundle install to install missing gems.
I don't what caused this error all of a sudden but this only seems to appear when I run rails c. All other rails commands work properly. I've tried running bundle install and bundle update but the error persists. Has anyone encountered this error before? Would it be advisable to simply remove the offending line in `Gemfile.lock'?
Delete your Gemfile.lock and rerun bundle install. It will be rebuilt with the appropriate dependencies. If you're still having issues, you may have a version/dependency conflict between two or more gems.
I ran 'gem update' to try to fix a problem in a different app i was working on. Now my main app doesn't work properly because i have a bunch of too-new gems. Is there a way to undo the gem update? Or revert my gems to the versions mentioned in my team's Gemfile.lock file?
Update: It specifically complains about Rake when i try to run 'rake spec'
(Gem::LoadError: You have already activated rake 10.5.0, but your Gemfile requires rake 10.4.2. Prepending bundle exec to your command may solve this.)
If you currently have a more recent version of a gem than is specified in your Gemfile.lock, then it should suffice to rewrite the Gemfile with the versions mentioned in Gemfile.lock and run a bundle install.
I tested this locally (downgraded a version in both Gemfile.lock and Gemfile) and bundler installed the old version without problems.
Run 'gem uninstall rake' if you have multiple versions it will ask you which you wish to remove.
Then run 'gem install rake -v 10.4.2' to install the right version.
Worked for me and much less risky than bundle updating everything.
I'm loosely going through http://ruby.railstutorial.org/chapters/ and am at the point of preparing to test http://ruby.railstutorial.org/chapters/static-pages#sec:testing_tools . I listed the autotest related gems in my Gemfile and ran bundle install without incident, but when I tried to start the server I got the error Could not find ZenTest-4.6.2 in any of the sources. So I added ZenTest 4.6.2 to my Gemfile and reran bundle install.
Now according to my bash terminal, my bundle is complete including Using ZenTest (4.6.2), but when I try to start my server I'm still getting the error Could not find ZenTest-4.6.2 in any of the sources. So is it installed or is it not installed? And how should I resolve this conflict?
It should just say: gem "ZenTest" in your gem file, not the version # as well.
As of yesterday, I'm unable to update my bundle. It gets stuck at "Fetching source index for http://rubygems.org/". I know this usually takes a while, but I've waited for hours and tried several times over the last day. I have a 20 Mbit internet connection.
I'm using gem 1.8.5, Bundler version 1.0.15, rvm 0.1.46, ruby-1.9.2-p0 [ x86_64 ] and Rails 3.0.8 on a Macbook. Gemfile: https://gist.github.com/1028832
The reason I'm trying to run Bundle Update is because the bundle was set to rake 0.8.7 until recently (not sure why), but rake started demanding that I move up to 0.9.2. So I changed the Gemfile. Bundle Install tells me to:
bundle install
Fetching source index for http://rubygems.org/
You have requested:
rake >= 0.9.2
The bundle currently has rake locked at 0.8.7.
Try running `bundle update rake`
My .bundle/config contains:
---
BUNDLE_DISABLE_SHARED_GEMS: "1"
BUNDLE_WITHOUT: production
I'm not behind a proxy.
I even tried deleting Gemfile.lock, reinstalling the ruby version in rvm and deleting all gems:
rm Gemfile.lock
rvm uninstall 1.9.2
rvm install 1.9.2
for x in `gem list --no-versions`;do gem uninstall $x -aIx;done
gem install bundle
bundle install
Comment out all gems and set explicit versions for rails (e.g. 3.0.8) and rake (e.g. 0.9.2). Then just run rake, cucumber and the server to see which gems you really need and add them back one by one manually.
I had the same problem with jam at “Fetching source index for http://rubygems.org/”
In my case it was solved by using the rubygems modern index instead of the API endpoint:
bundle install --full-index
I checked the Gemfile.lock and added the specific version (e.g. ~> 1.3.0) to the gems that had none in the Gemfile. Found out to be faster, than uncommenting gem by gem.
By doing the accepted answer and uncommenting gem by gem, I found that the error was due to incompatible gem dependencies. Maybe the resolution algorithm was stuck in a loop.