Irbrc location under windows

Hello,

Where does irb look for the irbrc file under windows? I tried

c:\ruby\bin.irbrc etc. I found on the pickaxe that there is ~/.irbrc,
.irbrc, irb.rc, _irbrc, and $irbrc. But it doesn’t give any absolute paths
(same in irb sources).
I also found
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&threadm=p05111b2
9b992df65c0aa%40%5B63.21.238.130%5D&rnum=2&prev=/groups%3Fhl%3Den%26lr%3D%26
ie%3DUTF-8%26oe%3Dutf-8%26q%3Dirb%2Binit%2Birbrc%2Bwindows%26sa%3DN%26tab%3D
wg and
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&threadm=20030622
185155.GA55150%40uk.tiscali.com&rnum=3&prev=/groups%3Fq%3Dirbrc%2Bwindows%26
hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3Dutf-8%26selm%3D20030622185155.GA55150%25
40uk.tiscali.com%26rnum%3D3 but i found no definitive answer.
Neither with the .irbrc (or irb.rc for that matter) in the current dir
when typing irb nor with it in c:\ruby\bin is it executed.

thank you,

emmanuel

Hello,

Where does irb look for the irbrc file under windows? I tried

c:\ruby\bin.irbrc etc. I found on the pickaxe that there is ~/.irbrc,
.irbrc, irb.rc, _irbrc, and $irbrc. But it doesn’t give any absolute
paths (same in irb sources).

I don’t use native windows Ruby, but my advice is create a HOME
environment variable, equal to “your” directory. (I use D:/home/gavin,
for instance.)

I’m pretty confident that if you do that, and restart cmd.exe (or however
you run irb), then irb will look in you HOME directory for .irbrc etc.

Gavin

Hi,

···

At Mon, 28 Jul 2003 16:11:04 +0900, Emmanuel Touzery wrote:

Where does irb look for the irbrc file under windows? I tried

c:\ruby\bin.irbrc etc. I found on the pickaxe that there is ~/.irbrc,
.irbrc, irb.rc, _irbrc, and $irbrc. But it doesn’t give any absolute paths
(same in irb sources).

~ means the directory given by HOME environment variable.
Others are placed in the current directory.


Nobu Nakada

Thank you Gavin! it works very well… But now i have another question. I use
irb completion under linux, but under windows it doesn’t seem to work (due
to the lack of readline). From a quick google, it seems it works under
ruby-cygwin, but not under the PragProg windows native version. is this
correct?

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&threadm=kl6nvu86
sp936dmb5c72d7p5cbg48c317v%404ax.com&rnum=4&prev=/groups%3Fhl%3Den%26lr%3D%2
6ie%3DUTF-8%26oe%3Dutf-8%26q%3Dirb%2Bcompletion%2Bwindows%26sa%3DN%26tab%3Dw
g

C:>irb
irb(main):001:0> require ‘irb/completion’
LoadError: No such file to load – readline
from c:/ruby/lib/ruby/1.6/irb/completion.rb:10:in require' from c:/ruby/lib/ruby/1.6/irb/completion.rb:10 from (irb):1:in require’
from (irb):1:in irb_binding' from c:/ruby/lib/ruby/1.6/irb/workspace.rb:51:in irb_binding’
from c:/ruby/lib/ruby/1.6/irb/workspace.rb:51
Maybe IRB bug!!

thank you,

emmanuel

···

----- Original Message -----
From: “Gavin Sinclair” gsinclair@soyabean.com.au
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Monday, July 28, 2003 8:27 AM
Subject: Re: irbrc location under windows

Hello,

Where does irb look for the irbrc file under windows? I tried

c:\ruby\bin.irbrc etc. I found on the pickaxe that there is ~/.irbrc,
.irbrc, irb.rc, _irbrc, and $irbrc. But it doesn’t give any absolute
paths (same in irb sources).

I don’t use native windows Ruby, but my advice is create a HOME
environment variable, equal to “your” directory. (I use D:/home/gavin,
for instance.)

I’m pretty confident that if you do that, and restart cmd.exe (or however
you run irb), then irb will look in you HOME directory for .irbrc etc.

Gavin

It used to work under my Cygwin before I upgraded to 1.8. I vaguely
remember instructing irb to support completion at some point, but I
don’t remember the details…

Gavin

···

On Monday, July 28, 2003, 5:38:11 PM, Emmanuel wrote:

Thank you Gavin! it works very well… But now i have another question. I use
irb completion under linux, but under windows it doesn’t seem to work (due
to the lack of readline). From a quick google, it seems it works under
ruby-cygwin, but not under the PragProg windows native version. is this
correct?

Someone did a pure ruby readline once. I wonder if irb ought to fall
back to that.

martin

···

Emmanuel Touzery emmanuel.touzery@wanadoo.fr wrote:

Thank you Gavin! it works very well… But now i have another question. I use
irb completion under linux, but under windows it doesn’t seem to work (due
to the lack of readline). From a quick google, it seems it works under
ruby-cygwin, but not under the PragProg windows native version. is this
correct?