I installed ruby-1.9.3-p286 on my server with RVM, and confirmed it with ruby -v in the terminal.
However, following the instructions from RVM-Capistrano gem integration,
set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"")
require 'rvm/capistrano'
and running cap deploy, it still insists on running ruby-1.9.3-p0, and of course it can't find it.
Manually opening up irb in Terminal and running ENV['GEM_HOME'].gsub(/.*\//,"") returns ruby-1.9.3-p286, so I am puzzled why it keeps asking for ruby-1.9.3-p0.
Anyone encountered a similar situation?
I was just struggling with a similar problem, googled for a solution, and found your question. Anyway, in my case, I had specified the Ruby version to be
1.9.3-p327everywhere: in my.bashrcfile (rvm --default use 1.9.3-p327), in the application's.rvmrcfile (rvm use 1.9.3-p327@my_app_name), etc., and I still got this output when commandingcap deployorcap deploy:setup:Turns out the problem was in Capistrano's configuration file,
my_app_name/config/deploy.rb. It defined the Ruby version like this:Why Capistrano turned this into
1.9.3-p286is still a mystery to me. Anyway, I added the Ruby patchlevel to the line, like this:And then
cap deploy:setupandcap deploystarted working.Furthermore, I found out that Capistrano has added the possibility of using the Ruby version given in the application's
.rvmrcfile (see this), so you can just set that line toand never have to touch it again, even if you change the Ruby version in
.rvmrc.