Reputation: 2830
I am deploying my 1st Rails app using capistrano, unicorn, rbenv, nginx, linode, ubuntu 12.04. When I run
bin/cap deploy:cold
in my app root, I get the following error back:
* 2012-10-31 01:19:36 executing `bundle:install'
* executing "cd /home/mr_deployer/apps/prjct_mngr/releases/20121031001933 && bundle install --gemfile /home/mr_deployer/apps/prjct_mngr/releases/20121031001933/Gemfile --path /home/mr_deployer/apps/prjct_mngr/shared/bundle --deployment --quiet --without development test"
servers: ["xxxxxxxxxxxxx"]
[xxxxxxxxxxxxx] executing command
** [out :: xxxxxxxxxxxxx] Could not find rake-0.9.2.2 in any of the sources
** [out :: xxxxxxxxxxxxx] Run `bundle install` to install missing gems.
command finished in 1046ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/mr_deployer/apps/prjct_mngr/releases/20121031001933; true"
servers: ["xxxxxxxxxxxxx"]
[xxxxxxxxxxxxx] executing command
command finished in 625ms
failed: "sh -c 'cd /home/mr_deployer/apps/prjct_mngr/releases/20121031001933 && bundle install --gemfile /home/mr_deployer/apps/prjct_mngr/releases/20121031001933/Gemfile --path /home/mr_deployer/apps/prjct_mngr/shared/bundle --deployment --quiet --without development test'" on xxxxxxxxxxxxx
I have run bundle install --path vendor/bundle on my development machine, and gem rake is installed both on dev machine and on linode vps. Why cant it find rake?
UPDATE:
I have tried adding path of my rake gem on linode to both my bashrc on linode and to :default_envoronment in deploy.rb file. Still getting the same error...
Upvotes: 0
Views: 849
Reputation: 3490
This error is not indicating that rake is not installed on the machine you are deploying to. This error means that Bundler, when it tried to install your gems, was unable to find Rake version 0.9.2.2 in the sources listed in your Gemfile. Does your Gemfile contain a line like source "http://rubygems.org"
?
Upvotes: 0
Reputation: 21972
Capistrano tries to run command cd /home/mr_deployer/apps/prjct_mngr/releases/20121031001933 && bundle install --gemfile /home/mr_deployer/apps/prjct_mngr/releases/20121031001933/Gemfile --path /home/mr_deployer/apps/prjct_mngr/shared/bundle --deployment --quiet --without development test
on remote machine where you service is deployed to.
Looks like remote node doesn't have rake
installed that bundle
trying to use.
Maybe you should check that all necessary gems are installed on remote machine.
Upvotes: 0
Reputation: 1095
Try to specify your path in capistrano receipe, for example:
default_environment["PATH"] = "/usr/local/bin:/usr/bin:/usr/local/rvm/bin/:/var/lib/gems/1.9.1/bin"
If you don't know how looks your path, connect to your server via ssh and run command
echo $PATH
Upvotes: 0