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 web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
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)