IRB config file location?

K

Ken A.

Hi. I'm using ruby version : ruby 1.8.6 (2007-09-24 patchlevel 111)
[i386-mswin32] and I'm trying to figure out where irb config file is
located, but no success at all. Would anyone help me on this?
 
Ë

ëøÏ鹦

Well, may be this will give you some help
require 'rbconfig.rb'
include Config
CONFIG["host"]
CONFIG["libdir"]
 
L

Luis Lavena

Hi. I'm using ruby version : ruby 1.8.6 (2007-09-24 patchlevel 111)
[i386-mswin32] and I'm trying to figure out where irb config file is
located, but no success at all. Would anyone help me on this?

IRB configuration file (.irbrc) will be located in your HOME
directory.

IRB will try to find it in "~", being it the user HOME folder.
Since by default HOME isn't set on Windows, don't know if IRB fall
back to try other locations.

I suggest you set it :)

Please do it like this:

Control Panel -> System -> Advanced -> Environment Variables

Under "User variables" hit new and fill:

Name: HOME
Value: %HOMEDRIVE%%HOMEPATH%

Use %HOMEDRIVE% and %HOMEPATH% instead of %USERPROFILE%, this works
with corporative environments where profiles are being stored in
different places than users HOME (and with roaming profiles).

HTH,

Luis
 
G

Giles Bowkett

I'm not on Windows, but I made an IRB gem which requires IRB's config
file (usually .irbrc) and I got the following as a documentation
contribution:

Windows users have a couple options. The easiest is to define an
environment variable called IRBRC and set it to the full path of your
irbrc (e.g. "C:\Documents and Settings\\_irbrc"). Presto, .irbrc for
Windows. You could also set your HOME-Variable to any directory you
want and put your ".irbrc" in there. (It needs to be called ".irbrc",
"_irbrc" won't work). Since Windows Explorer won't let you create a
file with a dot in the beginning, use any text editor (Notepad will do
just fine) and "Save As" to save it as ".irbrc". (The quotation marks
make the magic happen.) We don't recommend this if you're also using
MSYS or Cygwin, as they use the same variable for their own purposes.

I'm hoping it's correct because I put it in the README for the gem. :)

http://utilitybelt.rubyforge.org/usage.html

--
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com
 
K

Ken A.

Thanks everybody for the great tips ... I just managed to configure the
irbrc file, tested and it's working fine :)
 

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,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top