0

I'm trying to install rails using

$ sudo gem install rails

But I get this error:

ERROR:  While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
no such name (https://rubygems.org/quick/Marshal.4.8/activerecord-4.0.2.gemspec.rz

What am I doing wrong? do I have to use sudo apt-get install rails instead?

I have in my system

$ ruby -v
> 2.1.11
$ gem -v 
> ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

I'm following these instructions

Solved

How did I solved it?

I followed this as Mitch advised me, but after sudo apt-get install ruby1.9.3 I got that ruby -v showed ruby 1.8.7

So I did this and then I continue with

sudo gem install rails

it worked.

Andres
  • 121
  • 1
  • 7
  • Possible duplicate for the same: http://stackoverflow.com/questions/18158686/rails-error-while-executing-gemremotefetcherunknownhosterror – phineas Dec 21 '13 at 18:40
  • Possible Duplicate? http://askubuntu.com/questions/284459/couldnt-find-any-package-by-regex-ruby/284471#284471 – Mitch Dec 21 '13 at 19:32
  • @Mitch I did that but when I try sudo gem install rails it does nothing – Andres Dec 21 '13 at 20:56
  • After see your edit, please create a new answer. Don't write it on the question! – Lucio Dec 22 '13 at 19:44
  • @Lucio I tried but my reputation is so slow – Andres Dec 22 '13 at 20:22
  • Really? Could you show me an screenshoot of the message that you get when trying to answer your own post? Upload it into imgur.com and link it here – Lucio Dec 22 '13 at 23:04
  • @Lucio now I can. It's my first post here so yesterday my reputacion was 1(too slow). That's why I guess I couldn't. – Andres Dec 23 '13 at 00:57

1 Answers1

1

How did I solved it?

I followed this as Mitch advised me, but after sudo apt-get install ruby1.9.3 I got that ruby -v showed ruby 1.8.7

So I did this and then I continue with

sudo gem install rails

it worked.

Andres
  • 121
  • 1
  • 7