[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Trouble using rubygems config file on windows

rpardee@gmail.com

12/8/2006 6:08:00 PM

Hey All,

I'm trying to get rubygems to use my .gemrc file on windows and having
trouble--dig it:

C:\ruby\bin>gem environment
Failed to load C:\Documents and Settings\pardre1/.gemrc
Rubygems Environment:
- VERSION: 0.9.0 (0.9.0)
- INSTALLATION DIRECTORY: C:/ruby/lib/ruby/gems/1.8
- GEM PATH:
- C:/ruby/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rub...

The file listed does indeed exist--I'm guessing there needs to be a
..gsub(/\\/, "/") in there somewhere to translate the backslashes to
forwardslashes on windows?

Thanks!

-Roy

3 Answers

Paul Lutus

12/8/2006 6:19:00 PM

0

rpardee@gmail.com wrote:

> Hey All,
>
> I'm trying to get rubygems to use my .gemrc file on windows and having
> trouble--dig it:
>
> C:\ruby\bin>gem environment
> Failed to load C:\Documents and Settings\pardre1/.gemrc

See this line? Try changing the forward slash at the right to a
reverse-slash.

/ ...

> The file listed does indeed exist--I'm guessing there needs to be a
> .gsub(/\\/, "/") in there somewhere to translate the backslashes to
> forwardslashes on windows?

Hard to say. But be consistent -- all forward, or all backward, but not
mixed as they are now.

--
Paul Lutus
http://www.ara...

rpardee@gmail.com

12/8/2006 6:45:00 PM

0

Sure--I get that they all have to be forward slashes. But it's
rubygems--not code I've written, so I'm not sure exactly where to make
the change.

That said--I did try changing line 380 of
C:\ruby\lib\ruby\site_ruby\1.8\rubygems.rb to:

return ENV[homekey].gsub(/\\/, "/") if ENV[homekey]

And now I get the same error message, except that the filespec looks
righteous:

C:\ruby\bin>gem environment
Failed to load C:/Documents and Settings/pardre1/.gemrc
Rubygems Environment:
- VERSION: 0.9.0 (0.9.0)
- INSTALLATION DIRECTORY: C:/ruby/lib/ruby/gems/1.8
- GEM PATH:
- C:/ruby/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rub...

In irb, I can do e.g.,:

irb(main):001:0> f = File.open("C:/Documents and
Settings/pardre1/.gemrc")
=> #<File:C:/Documents and Settings/pardre1/.gemrc>
irb(main):002:0> f.read
=> "--http-proxy http://localhost:5865"
irb(main):003:0>

So maybe the problem is that my file is not interpretable as YAML? If
so--can anybody tell me how to say "use the proxy server
http://localhost:5865" in YAML?

Thanks!

-Roy



Paul Lutus wrote:
> rpardee@gmail.com wrote:
>
> > Hey All,
> >
> > I'm trying to get rubygems to use my .gemrc file on windows and having
> > trouble--dig it:
> >
> > C:\ruby\bin>gem environment
> > Failed to load C:\Documents and Settings\pardre1/.gemrc
>
> See this line? Try changing the forward slash at the right to a
> reverse-slash.
>
> / ...
>
> > The file listed does indeed exist--I'm guessing there needs to be a
> > .gsub(/\\/, "/") in there somewhere to translate the backslashes to
> > forwardslashes on windows?
>
> Hard to say. But be consistent -- all forward, or all backward, but not
> mixed as they are now.
>
> --
> Paul Lutus
> http://www.ara...

Heinrich

7/30/2012 9:44:00 AM

0



"NoSpamAtAll" schreef in bericht news:jv5kqp$t8e$1@pcls6.std.com...

In article <ScsRr.45574$3z3.27523@newsfe01.iad>,
Heinrich <Heinrich@Ruhrgasnet.de> wrote:

> i told my wife about you and i can tgell you that she does
> not like rude persons like you are

She may not like rude, but she sure likes my rod!! :)

stupid reply as expected. you must be an aussie