lib/rconf/configurators/ruby_configurator.rb in rconf-0.9.7 vs lib/rconf/configurators/ruby_configurator.rb in rconf-0.9.8
- old
+ new
@@ -84,10 +84,18 @@
else
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}'")
- Command.execute_in_ruby('gem', 'install', 'rconf')
+ end
+ 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}'",