Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > IRB config file location?

Reply
Thread Tools

IRB config file location?

 
 
Ken A.
Guest
Posts: n/a
 
      12-28-2007
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?
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
ëøÏ鹦
Guest
Posts: n/a
 
      12-28-2007
Well, may be this will give you some help
require 'rbconfig.rb'
include Config
CONFIG["host"]
CONFIG["libdir"]

 
Reply With Quote
 
 
 
 
Luis Lavena
Guest
Posts: n/a
 
      12-28-2007
On Dec 28, 10:41 am, "Ken A." <ken.awam...@gmail.com> wrote:
> 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
 
Reply With Quote
 
Giles Bowkett
Guest
Posts: n/a
 
      12-28-2007
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

 
Reply With Quote
 
Ken A.
Guest
Posts: n/a
 
      12-28-2007
Thanks everybody for the great tips ... I just managed to configure the
irbrc file, tested and it's working fine

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
section with in a section config file and reading that config file kampy Python 9 10-19-2012 10:59 PM
dll config and web.config and Label Expressions (binding label text to dll config settings) CSharpner ASP .Net 0 04-09-2007 09:00 PM
irb require ... where does irb look? what path? anne001 Ruby 1 06-27-2006 12:07 PM
irb question - variable definitions when calling irb from a script problem Nuralanur@aol.com Ruby 1 10-26-2005 09:13 PM
[ANN] irb-history 1.0.0: Persistent, shared Readline history for IRB Sam Stephenson Ruby 1 06-18-2005 08:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57