3

I'm having trouble installing the bundler gem from behind my proxy server.

$ gem install bundler --http-proxy http://my.proxy/proxy.pac:80
ERROR:  Could not find a valid gem 'bundler' (>= 0) in any repository
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    bad response Not Found 404 (http://rubygems.org/latest_specs.4.8.gz)

$ rails -v
Rails 4.1.1

$ ruby --version
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]

Anyone have suggestions on how to resolve these errors?

3 Answers3

4

From gem help install documentation:

sudo gem install bundler -p http://myawesome.proxy.com:1234
caneta
  • 1,612
  • 2
  • 20
  • 34
2

Try this:

sudo HTTP_PROXY="http://10.3.100.207:8080" gem install bundler

Replace "10.3.100.207" with your host and "8080" with your "port value"

Or try this:

sudo HTTP_PROXY="http://10.3.100.207:8080" or sudo export HTTP_PROXY="http://10.3.100.207:8080"

Also do with https and HTTPS as I faced problem once due to this.

proxima
  • 323
  • 2
  • 15
0

I don't think gem supports evaluating a .pac file. You need to give it the correct proxy configuration directly.

Tim Moore
  • 8,958
  • 2
  • 23
  • 34
  • You are correct. I'm now getting a 407 error however: `$ gem install bundler --http-proxy http://myusername:mypassword@my.proxy:8080 ERROR: Could not find a valid gem 'bundler' (>= 0) in any repository ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) bad response Proxy Authentication Required 407 (http://rubygems.org/latest_specs.4.8.gz)` –  Jul 21 '14 at 11:51
  • Try using environment variables, as described in http://stackoverflow.com/a/9382152/29470 – Tim Moore Jul 21 '14 at 23:46