1

Hi I am new to Ruby on Rails and trying to setup in my machine [Ububntu 12.04 LTS]. I successfully installed Ruby and Gem now I am getting error while installing Rails Here is my version of Ruby and Gem

$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
$ gem -v
2.1.7

Now when I try command $ sudo gem install rails or $ gem install rails

ERROR:  Could not find a valid gem 'rails' (>= 0), here is why:
      Unable to download data from https://rubygems.org/ - SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server session ticket A (https://rubygems.org/latest_specs.4.8.gz)

I looked this answer and updated the ca-certificate using $ sudo update-ca-certificates but it is still not working?

Help me as I new to RoR I have no idea what to do next since I have applied all measures I could. Thank you in advanced.

EDIT: Suggest me a way I can solve this problem, incase I don't find one I will be doing it using RVM.

Community
  • 1
  • 1
Aatish Sai
  • 1,647
  • 1
  • 26
  • 41
  • http://stackoverflow.com/questions/11391679/ubuntu-12-how-to-install-ruby-and-rails-correctly – chait.. Oct 10 '13 at 05:46
  • try changing in gemfile https rubygems.org to http rubygems.org – Neeraj Oct 10 '13 at 07:07
  • possible duplicate of [SSL Error When installing rubygems, Unable to pull data from 'https://rubygems.org/](http://stackoverflow.com/questions/19150017/ssl-error-when-installing-rubygems-unable-to-pull-data-from-https-rubygems-o) – mpapis Oct 10 '13 at 07:15

4 Answers4

3

Some packages may b missing. Try this.

rvm get head
rvm requirements run
rvm remove 1.9.3
rvm use 1.9.3 --install --default
gem install rails
chait..
  • 106
  • 5
3

I had this issue and simply had to update RubyGems

gem update --system
mervis
  • 31
  • 2
1

Most likely rubygems.org is down temporarily, try running this command to add one of the mirrors as source

gem source -a 'https://production.cf.rubygems.org'

and then run

gem install rails

There are some more mirrors available.

Litmus
  • 10,558
  • 6
  • 29
  • 44
0

Without ssl:

$gem install rails --source http://rubygems.org
Stephane Delcroix
  • 16,134
  • 5
  • 57
  • 85
Neeraj
  • 180
  • 9