Question

I encountered Bundler::GemNotFound: Could not find rake-0.9.2.2 in any of the sources during deploying my application using capistrano, and when processing deploy:assets:precompile.

The command is: cd /opt/app/deploy/entercamp/releases/20120627132117 && /usr/local/rvm/rubies/jruby-1.6.7/bin/jruby --1.9 -S bundle exec rake RAILS_ENV=staging RAILS_GROUPS=assets assets:precompile

I tried the command manually on the server and it works quite ok. And I could see that rake-0.9.2.2 is installed in the result output of bundle:install in the deploy process.

Where could be the problem?

Detailed information is in: https://gist.github.com/3005237

Was it helpful?

Solution

This just got fixed with help of Michal from rvm-capistrano project.

It raises this error is because jruby is install with version 1.8 by default and it tries to switch to 1.9 when deploying and that causes the problem.

The solution is to install jruby with version 1.9 by default: rvm install jruby-1.6.7.2 --1.9 and then it works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top