lib/rvm/capistrano/base.rb in rvm-capistrano-1.5.1 vs lib/rvm/capistrano/base.rb in rvm-capistrano-1.5.2
- old
+ new
@@ -75,10 +75,14 @@
end
# evaluate :rvm_ruby_string => :local
set :rvm_ruby_string_evaluated do
value = fetch(:rvm_ruby_string, :default)
if value.to_sym == :local
- value = ENV['GEM_HOME'].gsub(/.*\//,"")
+ if defined? ENV['RUBY_VERSION']
+ value = ENV['RUBY_VERSION'].gsub('ruby-','')
+ else
+ value = ENV['GEM_HOME'].gsub(/.*\//,"")
+ end
end
value.to_s
end
# Use the default ruby on the server, by default :)