Rails Bundle Update FetchError fail

173 views Asked by At

Mac OSX 10.10.2 Ruby 2.2.0

I'm going through the "One Month Rails" course, and I'm stalling on the part where I need to add bootstrap to the project. I've tried tons of solutions recommended, but nothing seems to work for me.

Here is the error I keep getting:

Gem::RemoteFetcher::FetchError: Errno::ETIMEDOUT: Operation timed out 
- connect(2) for "rubygems.global.ssl.fastly.net" port 80     
(http://rubygems.org/gems/autoprefixer-rails-5.2.0.gem)

An error occurred while installing autoprefixer-rails
(5.2.0), and Bundler cannot continue.
Make sure that `gem install autoprefixer-rails -v '5.2.0'`
succeeds before bundling.

Things that have failed:

  1. Changing https to http does not work
  2. Bundle update does not work
  3. Restarting the computer does not work
  4. Restarting the Terminal does not work

Please help!

2

There are 2 answers

3
rick On

Have you tried to install autoprefixer-rails gem using this command : gem install autoprefixer-rails -v '5.2.0' ? After that try bundle install again.

0
ChaserAide On

I finally got it to work, but I'm not sure what it was because.

It was one or more of the following:

  1. I live in China, so I have to use a VPN for many things. I turned my VPN on. This probably wasn't it because the Rubygems website isn't blocked in China and I did try this before.

  2. My XCode was out of date. I had to delete XCode and download it again to get the update.

  3. I turned on root in the terminal with sudo su - before adding autoprefixer with root# gem install autoprefixer-rails -v '5.2.0', as Rick suggested. I'm thinking the root install is what made this work. Yay!