Rails Install Fails With Ruby 2.1

I just installed Ruby 2.1 using the instructions for OSX:

https://github.com/postmodern/chruby/wiki/Ruby

Everything is working fine, and I installed some stones without any problems.

However, when installing rails using:

$ sudo gem install rails -V

Installation fails with error:

ERROR: when executing gem ... (Gem :: RemoteFetcher :: UnknownHostError) there is no such name ( https://api.rubygems.org/quick/Marshal.4.8/atomic-1.1.4-java.gemspec.rz )

I can grab the file from this URL using curl or pasting it into the address bar, so it seems like the file exists.

Why does the installation not work?

I am not a proxy and do not use a flag --no-http-proxy.

Before the error, about 100 other files were uploaded:

HEAD https://api.rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
HEAD https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
304 Not Modified
GET https://api.rubygems.org/quick/Marshal.4.8/rails-4.0.2.gemspec.rz
302 Moved Temporarily
GET https://aws-eu-cache01.rubygems.org/quick/Marshal.4.8/rails-4.0.2.gemspec.rz
200 OK
HEAD https://api.rubygems.org/specs.4.8.gz
302 Moved Temporarily
HEAD https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz
304 Not Modified
GET https://api.rubygems.org/quick/Marshal.4.8/railties-4.0.2.gemspec.rz
302 Moved Temporarily
GET https://aws-eu-cache01.rubygems.org/quick/Marshal.4.8/railties-4.0.2.gemspec.rz

... etc.

+3
1

- .

gem update --system
0

All Articles