[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

require-rubygems test and ohai



lib/ohai/plugins/ruby.rb has the following check to find rubygems.
Does it need to be commented out?

# Perform one more (conditional) query
bin_dir = languages[:ruby][:bin_dir]
ruby_bin = languages[:ruby][:ruby_bin]
gem_binaries = [
  run_ruby("require 'rubygems'; puts ::Gem.default_exec_format % 'gem'"),
  "gem"
].map {|bin| ::File.join(bin_dir, bin)}
gem_binary = gem_binaries.find {|bin| ::File.exists? bin }
if gem_binary
  languages[:ruby][:gems_dir] = run_ruby "puts %x{#{ruby_bin}
#{gem_binary} env gemdir}.chomp!"
  languages[:ruby][:gem_bin] = gem_binary
end


-- 
പ്രവീണ്‍ അരിമ്പ്രത്തൊടിയില്‍
You have to keep reminding your government that you don't get your
rights from them; you give them permission to rule, only so long as
they follow the rules: laws and constitution.


Reply to: