From: "Joseph E. Savard" Date: 2010-07-28T23:14:33+09:00 Subject: Re: Which Ruby is in use? You forgot to require "rbconfig" ruby -v -rrbconfig > From: Hassan Schroeder > Reply-To: > Date: Wed, 28 Jul 2010 08:22:42 +0900 > To: ruby-talk ML > Subject: Re: Which Ruby is in use? > > On Tue, Jul 27, 2010 at 3:52 PM, Joel VanderWerf > wrote: > >>>>>> File.join *Config::CONFIG.values_at("bindir", "ruby_install_name") >>>> >>>> => "/usr/local/bin/ruby" >>> >>> Works in a Rails console, but not a Ruby program. But thanks, now >>> that I consider it I should be able to work with that  :-) >> >> Hm, that's surprising. I tested it in ruby and jruby programs. What's the >> problem? > > ripple:~$ cat foo.rb > puts File.join *Config::CONFIG.values_at("bindir", "ruby_install_name") > ripple:~$ ruby foo.rb > foo.rb:1: uninitialized constant Config (NameError) > ripple:~$ jruby foo.rb > foo.rb:1: uninitialized constant Config (NameError) > ripple:~$ > > -- > Hassan Schroeder ------------------------ hassan.schroeder@gmail.com > twitter: @hassan >