capistrano / rvm

MIT License
140 stars 47 forks source link

capistrano-rvm and capistrano-rails cant find bundle #32

Closed magpieuk closed 10 years ago

magpieuk commented 10 years ago

Had a problem today when trying to deploy using capistrano and rvm.

rvm is system based.

When the capistrano was trying to use rake to precompile assets the system complained about not being able to find bundle. Previously in the deploy command had run successfully. I noticed that this command was run with "/usr/local/rvm/bin/rvm ruby-2.0.0-p353 do" while the rake task to do the precompile was "RAILS_ENV=staging bundle exec rake assets:precompile"

putting the following into the deploy.rb sorted it out SSHKit.config.command_map.prefix[:rake].unshift("/usr/local/rvm/bin/rvm ruby-2.0.0-p353 do") worked but as far as I could tell the capistrano-rvm should have already done this. Any ideas?

Kriechi commented 10 years ago

Are you using the latest gem versions pubished on rubygems? Could you please gist your Capfile and deploy.rb?

magpieuk commented 10 years ago

https://gist.github.com/magpieuk/8111697

Any hints on how to debug this would be great.

Kriechi commented 10 years ago

Your capistrano-rvm gem version is not up2date.

0.1.0 is the latest one, which should work better with capistrano-bundler, specifically fixing the issue you are experiencing.

magpieuk commented 10 years ago

Ah many thanks. Missed that I did not have the latest version, bundle update capistrano-rvm had not picked up the new version. will give it a go. Cheers!

magpieuk commented 10 years ago

Yep that sorted it. Thanks for assistance.