Read more

Bundler: Install gems behind a proxy

Henning Koch
February 01, 2016Software engineer at makandra GmbH

To install gems Bundler needs to be able to talk to https://api.rubygems.org.

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

If you are behind a proxy you can use the https_proxy environment variable:

https_proxy=http://myproxy:123 bundle install

Note that if there is no https_proxy env variable, Bundler will also look for a http_proxy env variable.

With Capistrano

Ideally the server you're deploying on exports an https_proxy variable for all shells.

If you don't have control over the server setup, you can also add this to your Capistrano config:

set :bundle_env_variables, { 'https_proxy' => 'http://myproxy:123' }
Posted by Henning Koch to makandra dev (2016-02-01 10:47)