JRuby on windows thru proxy gem install fails

Has anyone run into this problem?

Installed Jruby 1.3.1 from the windows installation exe.
Installed cntlm service to authenticate the proxy server here at my
work.

When I do a gem list -r, I’ll get a list of all the remote gems. I also
see the from the cntlm log the pass thru and authentication is working.

However, when I do a gem install rails, I get:

JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
ERROR: could not find gem rails locally or in a repository

Now, I know it can get to the remote by the listing, but I do not know
why I can not download and install and why it is failing to find rails
in the remote source repo.

Here is my gem env:

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.3
  • RUBY VERSION: 1.8.6 (2009-06-15 patchlevel 287) [java]
  • INSTALLATION DIRECTORY: C:/jruby-1.3.1/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: C:/jruby-1.3.1/bin/…/bin/jruby.bat
  • EXECUTABLE DIRECTORY: C:/jruby-1.3.1/bin/…/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-java-1.6
  • GEM PATHS:
    • C:/jruby-1.3.1/lib/ruby/gems/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
    • “install” => “–env-shebang”
    • “update” => “–env-shebang”
    • :sources => [“http://gems.rubyforge.org/”,
      http://gems.github.com”]
  • REMOTE SOURCES:

I hate MicroSuck Windows, but this is all I’m allowed to use here at
work.

Here is some output from cntlm, but I’m not sure it tells me
anything…

cntlm: PID 3752: Connection accepted from 127.0.0.1:2385
Thread processing…
Joining thread 6765432; rc: 0
List data: 5 => (null)
Found autenticated connection 5!

******* Round 1 C: 4, S: 5 *******!
Reading headers…
HEAD: GET http://gems.github.com/latest_specs.4.8.gz HTTP/1.1
Accept => /
User-Agent => Ruby, RubyGems/1.3.3
universal-java-1.6 Ruby/1
.8.6 (2009-06-15 patchlevel 287)
Connection => keep-alive
Keep-Alive => 30
If-Modified-Since => Wed, 29 Jul 2009 18:33:29 -0000
Host => gems.github.com
Sending headers…
Accept => /
User-Agent => Ruby, RubyGems/1.3.3
universal-java-1.6 Ruby/1
.8.6 (2009-06-15 patchlevel 287)
Connection => Keep-Alive
Keep-Alive => 30
If-Modified-Since => Wed, 29 Jul 2009 18:33:29 -0000
Host => gems.github.com
Proxy-Connection => Keep-Alive
No body.

******* Round 2 C: 4, S: 5 *******!
Reading headers…
HEAD: HTTP/1.1 304 Not Modified
Proxy-Connection => Keep-Alive
Connection => Keep-Alive
Via => 1.1 204.11.20.36
Age => 13
Date => Wed, 29 Jul 2009 18:33:27 GMT
Sending headers…
No body.

Thread finished.
Storing the connection for reuse (4:5).
Joining thread 6761264; rc: 0

SORRY FOR ALL THE NOISE IN THIS.

Any help would be great!

Thanks

GregD

Okay, I tried this on a MicroSuck box at home and it works fine, so it
is the proxy server that is causing th problem.

Now, my question is: how does the remote gem repositories work? Does it
open a seperate port to download the remote file? I’m thinking it might
and my work proxy server has that port locked down. Any insight would
be great.

Thanks,

GregD

Greg D. wrote:

Okay, I tried this on a MicroSuck box at home and it works fine, so it
is the proxy server that is causing th problem.

Now, my question is: how does the remote gem repositories work? Does it
open a seperate port to download the remote file? I’m thinking it might
and my work proxy server has that port locked down. Any insight would
be great.

Thanks,

GregD

Hello Greg,

If you are running behind a proxy server, make sure the environment
variable HTTP_PROXY is set.

Best regards,
Radoslav.