views:

119

answers:

2

I get the following output from the sudo bundle install command:

Fetching source index for http://rubygems.org/
Could not reach rubygems repository http://rubygems.org/
Could not find gem 'rspec-rails (>= 2.0.0.beta.22, runtime)' in any of the gem sources.

I have $http_proxy set correctly and I've added gem: --http-proxy=my proxy to ~/.gemrc. These settings are what allow my gem commands to work, and I was hoping they would translate to bundler, but no such luck.

Thinking sudo might not inherit my all of my environment, I also added those settings to my root user, but nada.

At this point bundler is preventing me from deploying my application, and I can find very few others running into this. If no one has an answer I will be forced to rip bundler out of my Rails app (which I wouldn't mind doing...)

A: 

Make sure your OS default http_proxy is already set up. If you're using Linux try the following command to know which proxy it's pointing to.

echo $http_proxy

In my Ubuntu OS, I set my http_proxy environment variable to my proxy server in ~/.bashrc

rasyadi
Yes, that works for many things, but as I stated, Bundler seems to ignore it.
bioneuralnet
A: 

You can download the required gems locally with gem install and then bundle install. Not exactly neat, I know, but it does work.

matttyg