lib/rconf/configurators/ruby_configurator.rb in rconf-0.6.11 vs lib/rconf/configurators/ruby_configurator.rb in rconf-0.6.13
- old
+ new
@@ -67,12 +67,10 @@
else
report_failure
report_check("Creating gemset #{gemset} for #{version}")
Command.execute('rvm', version, 'gemset', 'create', gemset,
:abort_on_failure => "Failed to create gemset '#{gemset}'")
- Command.execute('rvm', "#{version}@#{gemset}", 'exec', 'gem', 'install', 'rconf',
- :abort_on_failure => "Failed to install rconf gem in #{version}@#{gemset}")
report_success
end
report_check("Switching to gemset #{gemset}")
Command.execute('rvm', version, 'gemset', 'use', gemset,
:abort_on_failure => "Failed to switch to gemset '#{gemset}'")
@@ -144,12 +142,13 @@
# === Return
# out(String):: Installation output
def install_ruby(ruby)
Platform.dispatch(ruby) { :install_ruby_prerequesites }
report_check("Installing #{ruby} (this will take a while, please be patient)")
- res = Command.execute('rvm', 'install', ruby)
- report_result(res.success?)
+ Command.execute('rvm', 'install', ruby, :abort_on_failure => 'Failed to install ruby')
+ Command.execute("rvm #{version}@#{gemset} exec -- gem install rconf")
+ report_success
res.output
end
# Make sure to install all required linux packages first
#
@@ -202,10 +201,10 @@
f.puts "type -P rconf &>/dev/null && { rconf; }"
f.puts "type -P rconf &>/dev/null || { echo 'rconf not installed, skipping (see .rvmrc)'; }"
end
Command.execute('rvm', "#{version}@#{gemset}", 'trust', 'rvmrc')
report_success
- post_note "Configuration required switching the active ruby\nPlease run " + 'cd ..;cd -'.blue + ' to activate it and re-run rconf'
+ post_note "Configuration required switching the active ruby\nPlease run " + 'cd ..;cd -'.blue + ' to activate it and finish configuration'.green
rescue Exception => e
report_failure
report_error(e.message)
end
true