irbrc location under windows

E

Emmanuel Touzery

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
 
G

Gavin Sinclair

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
 
N

nobu.nokada

Hi,

At Mon, 28 Jul 2003 16:11:04 +0900,
Emmanuel said:
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.
 
E

Emmanuel Touzery

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" <[email protected]>
To: "ruby-talk ML" <[email protected]>
Sent: Monday, July 28, 2003 8:27 AM
Subject: Re: irbrc location under windows
 
M

Martin DeMello

Emmanuel Touzery said:
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
 
G

Gavin Sinclair

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?

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
 

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,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top