Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3613204
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:05:40+00:00 2026-05-18T22:05:40+00:00

I get the following output from the sudo bundle install command: Fetching source index

  • 0

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…)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:05:41+00:00Added an answer on May 18, 2026 at 10:05 pm

    OSX & Linux

    export http_proxy=http://user:password@host:port
    export HTTP_PROXY=$http_proxy
    

    If it’s using HTTPS, set it as well

    export https_proxy=http://user:password@host:port
    export HTTPS_PROXY=$https_proxy
    

    If you use sudo, by default sudo does not preserves http proxy variable. Use -E flag to preserve it

    $ sudo -E bundle install
    

    to make sudo preserves environment variables by default:

    https://memset.wordpress.com/2010/10/14/bash-http_proxy-from-a-user-environment-to-sudo-one/

    Windows

    As pointed by answers below, you can use SET instead

    SET HTTP_PROXY=http://user:password@host:port
    SET HTTPS_PROXY=%HTTP_PROXY%
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to deploying with Capistrano, and I'm trying the following: deploy.rb: set :application,
I have been trying to install tomcat-6.0.26 on my Mac OS 10.6. I followed
If I reference the SnakeYAML jar directly from a test program (see bottom), everything
I am working on a simple console app to get my feet wet with
I have a number of command line scripts in PHP that use exec() to
I'm trying to set a gem repository on one of our local servers. Here
I'm trying to connect to Gmail through IMAP with PHP running in Apache. This
I'm not quite sure how I got into this mess, but for some reason
I'm trying to strace a java applet, and strace doesn't seem to be working.
In Scala, I can make a caseclass, case class Foo(x:Int) , and then put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.