lib/rconf/configurators/ruby_configurator.rb in rconf-1.0.9 vs lib/rconf/configurators/ruby_configurator.rb in rconf-1.0.10
- old
+ new
@@ -206,11 +206,10 @@
# true:: Always return true
def check_ruby
unless Command.execute('rbenv', 'local', ruby_version).success?
report_check("Installing ruby #{ruby_version} (this will take a while, please be patient)")
Platform.dispatch(ruby_version) { :install_ruby }
- Command.execute('rbenv', 'local', ruby_version)
end
which = Command.execute('which', 'ruby').output.strip
if (which =~ %r(^(/usr)?/bin.*ruby$))
post_note "Your PATH is not setup correctly for rbenv; ('which ruby' => #{which}).\n" + PATH_ADVICE
@@ -231,9 +230,11 @@
def install_ruby(ruby)
Platform.dispatch(ruby) { :install_ruby_prerequisites }
# Can't abort on failure rbenv install seems to exist with a non zero error code even when successful :(
Command.execute('rbenv', 'install', ruby)
report_success
+ post_note "rconf installed ruby #{ruby} and needs to be restarted so the right ruby tools get activated\nPlease run 'rconf' again."
+ aborting(true)
true
end
# Install given ruby version using rbenv
# On Lion, need to setup CC env var before running rbenv install