简体   繁体   中英

Gem install rails doesn't work with Ruby 2.1.5 on Windows 7

I have already tried the gem install rails on two different Windows 7 machines. Ruby version installed 2.1.5 When I run gem source in command line I get https://rubygems.org But when I try to run gem install rails I get the following error:

=================

ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ( https://api.rubygems.org/latest_specs.4.8.gz )

====================================================

Is there a problem with the rubygems.org website ?

Thanks.

For ruby version 2.1.5 we need rails version >3.2 and <5.0. Try installing rails using below command for rails version 4.0.

gem install rails --version=4.0

And check rails -version, if it is changed to this one and run the server using below command.

rails server

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