lib/rconf/configurators/ruby_configurator.rb in rconf-0.9.9 vs lib/rconf/configurators/ruby_configurator.rb in rconf-0.9.10
- old
+ new
@@ -57,11 +57,11 @@
report_success
check_rvmrc
else
report_failure
report_check("Switching to #{version}")
- out = Command.execute('rvm', 'use', version, :env => { 'rvm_is_not_a_shell_function' => '0' }).output
+ out = Command.execute('rvm', 'use', version).output
case out
when /is not installed\./
report_failure
report_fatal "Failed to install #{ruby}" if @tried
Platform.dispatch(version) { :install_ruby }
@@ -85,24 +85,23 @@
report_failure
report_check("Creating gemset #{gemset} for #{version}")
Command.execute('rvm', version, 'exec', 'rvm', 'gemset', 'create', gemset,
:abort_on_failure => "Failed to create gemset '#{gemset}'")
end
+ report_check("Switching to gemset #{gemset}")
+ Command.execute('rvm', version, 'exec', 'rvm', 'gemset', 'use', gemset,
+ :abort_on_failure => "Failed to switch to gemset '#{gemset}'")
+ report_success
report_check("Checking whether rconf is installed")
res = Command.execute('rconf', '--version')
if res.output =~ /VERSION/
report_success
else
report_failure
report_check("Installing rconf")
Command.execute_in_ruby('gem', 'install', 'rconf', :abort_on_failure => "Failed to install rconf")
report_success
end
- report_check("Switching to gemset #{gemset}")
- Command.execute('rvm', version, 'exec', 'rvm', 'gemset', 'use', gemset,
- :abort_on_failure => "Failed to switch to gemset '#{gemset}'",
- :env => { 'rvm_is_not_a_shell_function' => '0' })
- report_success
end
if rubygems
report_check("Checking whether rubygems #{rubygems} is installed")
res = Command.execute_in_ruby('gem', '--version')
if res.success? && res.output =~ /^#{rubygems}$/