Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have followed all stapes from this page https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm

It all goes well until command to install rails

gem install rails

I get this error:

ERROR:  While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
    no such name (http://api.rubygems.org/api/v1/dependencies?gems=activerecord-deprecated_finders)

ON each new try error message shows different gem dependencies?gems=.......

Any advices on this issue?

EDIT:

Here is the full stack trace after executing coomand gem install rails -V

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
200 OK
GET https://api.rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
HEAD http://api.rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
HEAD http://production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
GET http://api.rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
HEAD https://api.rubygems.org/api/v1/dependencies
302 Moved Temporarily
HEAD https://bundler.rubygems.org/api/v1/dependencies
200 OK
HEAD http://api.rubygems.org/api/v1/dependencies
302 Moved Temporarily
HEAD http://bundler.rubygems.org/api/v1/dependencies
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=rails
302 Moved Temporarily
GET https://bundler.rubygems.org/api/v1/dependencies?gems=rails
200 OK
GET http://api.rubygems.org/api/v1/dependencies?gems=rails
302 Moved Temporarily
GET http://bundler.rubygems.org/api/v1/dependencies?gems=rails
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=railties
302 Moved Temporarily
GET https://bundler.rubygems.org/api/v1/dependencies?gems=railties
200 OK
GET http://api.rubygems.org/api/v1/dependencies?gems=railties
302 Moved Temporarily
GET http://bundler.rubygems.org/api/v1/dependencies?gems=railties
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=actionmailer
302 Moved Temporarily
GET https://bundler.rubygems.org/api/v1/dependencies?gems=actionmailer
200 OK
GET http://api.rubygems.org/api/v1/dependencies?gems=actionmailer
302 Moved Temporarily
GET http://bundler.rubygems.org/api/v1/dependencies?gems=actionmailer
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=activerecord
302 Moved Temporarily
GET https://bundler.rubygems.org/api/v1/dependencies?gems=activerecord
200 OK
GET http://api.rubygems.org/api/v1/dependencies?gems=activerecord
302 Moved Temporarily
GET http://bundler.rubygems.org/api/v1/dependencies?gems=activerecord
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=actionpack
302 Moved Temporarily
GET https://bundler.rubygems.org/api/v1/dependencies?gems=actionpack
200 OK
GET http://api.rubygems.org/api/v1/dependencies?gems=actionpack
302 Moved Temporarily
GET http://bundler.rubygems.org/api/v1/dependencies?gems=actionpack
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=activesupport
302 Moved Temporarily
GET https://bundler.rubygems.org/api/v1/dependencies?gems=activesupport
200 OK
GET http://api.rubygems.org/api/v1/dependencies?gems=activesupport
302 Moved Temporarily
GET http://bundler.rubygems.org/api/v1/dependencies?gems=activesupport
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=activemodel
302 Moved Temporarily
GET https://bundler.rubygems.org/api/v1/dependencies?gems=activemodel
200 OK
GET http://api.rubygems.org/api/v1/dependencies?gems=activemodel
302 Moved Temporarily
GET http://bundler.rubygems.org/api/v1/dependencies?gems=activemodel
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=sprockets-rails
302 Moved Temporarily
ERROR:  While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
    no such name (https://api.rubygems.org/api/v1/dependencies?gems=sprockets-rails)
share|improve this question
    
What version of ruby are you running? "ruby -v" –  shtuff.it Jan 22 at 21:13
    
@shtuff.it Ruby 2.1.0 –  eomeroff Jan 22 at 21:46
    
try adding a -V to get some verbose output. "gem install rails -V" –  shtuff.it Jan 22 at 22:13
    
@shtuff.it please see the edit. –  eomeroff Jan 22 at 22:18
    
are you able to resolve the host or download the link supplied outside of gem? "wget api.rubygems.org/api/v1/dependencies?gems=sprockets-rails"; –  shtuff.it Jan 22 at 23:05

1 Answer 1

up vote 2 down vote accepted
+50

I installed rails last week using the instructions here:

http://railsapps.github.io/installrubyonrails-ubuntu.html

Notable differences between the how-to's are:

the addition of the --ruby to the command:

\curl -L https://get.rvm.io | bash -s stable --ruby

The command to updating RVM is instead:

rvm get stable --autolibs=enable

The version of ruby to use is explicitly set:

rvm --default use ruby-2.1.0

Installation of js.Node

sudo apt-get install nodejs

The installation of rails is also preceded by explicitly setting the version:

rvm use ruby-2.1.0@rails4.0 --create

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.