Search code examples
proxybundlerruby-on-rails-3

setting bundler behind proxy


I'm trying to use bundler in my Rails application. But I can't get it working as I'm behind a proxy and I'm not sure how to configure bundler with proxy.

My $http_proxy variable is also set.

I'm using:

Rails - 3.0.0
Bundler - 1.0.7
Linux

And I have red that adding http_proxy to .gemrc file. But I couldn't locate that file in my Linux box.


Solution

  • Hi you need to create the .gemrc file. To set the http proxy for RubyGems put the following in ~/.gemrc

    ---
    http_proxy: PROXY_URL
    

    Replace PROXY_URL with whatever you currently have in the http_proxy environment variable you mentioned.