lib/rconf/configurators/ruby_configurator.rb in rconf-0.8.29 vs lib/rconf/configurators/ruby_configurator.rb in rconf-0.8.30
- old
+ new
@@ -193,13 +193,12 @@
#
# === Return
# true:: Always return true
def install_ruby_darwin(ruby)
report_check("Installing #{ruby} (this will take a while, please be patient)")
- xml = Command.execute('system_profiler', 'SPDeveloperToolsDataType', '-xml')
- version = Command.execute('xpath', '"//*[text()=\'_items\']/following-sibling::array/dict/child::key[text()=\'spdevtools_version\']/following-sibling::string/text()"')
+ version = `system_profiler SPDeveloperToolsDataType -xml | xpath "//*[text()='_items']/following-sibling::array/dict/child::key[text()='spdevtools_version']/following-sibling::string/text()" 2> /dev/null`
env = {}
- if version =~ /^4\.2\./
+ if version =~ /^4\.2\.[0-9]+/
if !File.executable?('/usr/bin/gcc-4.2')
report_fatal("The C compiler included with Xcode #{version} produces buggy ruby interpreters, please install the C compilers from https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg and re-run rconf")
else
env['CC'] = '/usr/bin/gcc-4.2'
end