简体   繁体   中英

Error while installing rails `$ gem install rails`

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.

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

我遇到了这个问题,只需要更新RubyGems

gem update --system

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.

没有ssl

$gem install rails --source http://rubygems.org

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM