Predefined variable to represent the ruby installation path?

Is there a Predefined variable that represent the ruby installation
path(on which directory ruby is installed)?

Olivia D. [email protected] wrote:

Is there a Predefined variable that represent the ruby installation
path(on which directory ruby is installed)?

on *nix systems you can issue the command

$ which ruby
/usr/bin/ruby

Olivia D. wrote:

Is there a Predefined variable that represent the ruby installation
path(on which directory ruby is installed)?


Posted via http://www.ruby-forum.com/.

check out rbconfig.rb, eg:

require ‘yaml’
require ‘rbconfig’

y Config::CONFIG

t.

It would seem that Config::CONFIG[‘bindir’] gives the directory from
which
the ruby executable is run. A lot of the other keys seem to hold
promise,
but are zero lengths strings ("") on my system (SunOS 5.8).

Garry Offord wrote:

It would seem that Config::CONFIG[‘bindir’] gives the directory from which
the ruby executable is run. A lot of the other keys seem to hold promise,
but are zero lengths strings ("") on my system (SunOS 5.8).

hmm. sounds like the installation of ruby itself needs someof
improvement for SunOS.

t.