Predefined variable to represent the ruby installation path?

O

Olivia Dou

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

Claudio Pro

Olivia Dou said:
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
 
T

Trans

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

check out rbconfig.rb, eg:

require 'yaml'
require 'rbconfig'

y Config::CONFIG

t.
 
T

Trans

Garry said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top