Skip to content

Commit

Permalink
Merge pull request #54 from mpapis/master
Browse files Browse the repository at this point in the history
Fix `rvm_path` detection in RVM mixed mode.
  • Loading branch information
FooBarWidget committed May 29, 2012
2 parents b2318bb + 85bb69d commit 8c9e147
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/phusion_passenger/platform_info/ruby.rb
Expand Up @@ -164,14 +164,15 @@ def self.rvm_path
[ENV['rvm_path'], "~/.rvm", "/usr/local/rvm"].each do |path|
next if path.nil?
path = File.expand_path(path)
return path if File.directory?(path)
script_path = File.join(path, 'scripts', 'rvm')
return path if File.directory?(path) && File.exist?(script_path)
end
# Failure to locate the RVM path is probably caused by the
# user customizing $rvm_path. Older RVM versions don't
# export $rvm_path, making us unable to detect its value.
STDERR.puts "Unable to locate the RVM path. Your RVM installation " +
"is probably too old. Please update it with " +
"'rvm update --head && rvm reload && rvm repair all'."
"'rvm get head && rvm reload && rvm repair all'."
exit 1
else
return nil
Expand Down

0 comments on commit 8c9e147

Please sign in to comment.