简体   繁体   中英

“sudo gem install rails” not working

i have ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] and gem 2.1.11 installed.I type sudo gem install rails into the command line, I get the following error message

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
SSL_connect returned=6 errno=0 state=SSLv3 read finished A (https://s3.amazonaws.com/production.s3.rubygems.org/quick/Marshal.4.8/rails-4.0.2.gemspec.rz)``

Three things:

  • That sounds like very much like you're using an outdated OpenSSL certificate file. Use gem update --system to update your RubyGems system gem. More details here .

  • The version of Ruby you're using (1.9.3p194) is old and has several security problems. Upgrade to 1.9.3p484 : https://www.ruby-lang.org/en/downloads/

  • Consider using a Ruby environment manager so that you don't have manage all this yourself. chruby and rbenv are good choices once because they won't mangle your cd command when you change directories.

I'm using Fedora 19 x86-64 on which is installed latest ruby and rails.

Do you specifically need old versions of ruby and rails? Ruby 2 and rails 4 are better/more secure. Latest tutorials from Michael Hartl and Agile Web Dev use these? There are too many ancient tutorials cluttering up learner space. Have you got latest version of RVM installed? Have you read the tutorials? One can use RVM to install rails like this:

rvm get stable to get the last rvm versión

rvm install 2.0.0 to install ruby 2.0

rvm use 2.0.0 to use ruby 2.0

gem install rails - to install rails 4.0

RVM is your friend. Google is your friend.

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