简体   繁体   中英

Rails 3 - Could not find rake-0.9.2 in any of the sources (Bundler::GemNotFound)

I would like to ask you about bundler… if I run command "bundle list", so I will get list of gems and is there "* rake (0.9.2)", but if I move my app to server, I am getting error Could not find rake-0.9.2 in any of the sources (Bundler::GemNotFound) — but this gem is in bundler… what could be wrong?

You should package the gems with the application.

http://gembundler.com/bundle_package.html

rm -rf Gemfile.lock then re-run bundle install

Showing following error for me when run command bundle install, "*Could not find rails_best_practices-1.13.7 in any of the sources*"

Just delete the Gemfile.lock and working for me.

+1 for tamaresalama's answer...

which version of Rails are you using?

make sure all your gem-dependencies are listed in the "Gemfile".. then run "bundle install"

If you use RVM, you should also create a specific gemset for your application, to encapsulate your gems for that application better. eg 'rvm gemset create yourname'

After you created the new gemset, you can set it as the default using 'rvm gemset use yourname --default' you then need to do a manual 'gem install rake" to make sure it's in the new gemset, before you do a 'bundle install'

hope this helps.

For me adding:

source 'https://rubygems.org'

to my Gemfile solved the problem. For some reason I removed it previously.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM