Couldn't install rails in windows 8.1 - ruby-on-rails

I had install ruby -version 2.2.4p230 but unable to install rails by using gem install rails. After writing this line in CMD the error saying 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)
I had searched a lot about this but didn't get anything useful for me. Please do a help for installing the rails.

Exact same error. Another poster suggested this link. http://guides.rubygems.org/ssl-certificate-update/ but it didn't work for me.
ruby -v
ruby 2.2.5p319
gem --version
2.4.5.1
gem install rails
Error: could not find a valid gem 'rails' <>=0>, here is why: Unable to download data from links removed not enough rep to post* This page suggests a manual certificate fix which I will try next http://guides.rubygems.org/ssl-certificate-update/#background I am thinking the pem file is not located correctly.

Related

SSL Error When installing rubygems, unable to install rails gem in windows 10

I am trying to install rails in windows 10. When I attempt to install rails in my gemset, I get the following issue:
C:\>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 returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz)
Currently using ruby version.
C:\>ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [i386-mingw32]
Gem Vesrion.
C:\>gem --version
2.2.3
how can I fix these issue help me out from this.
now I got solution for this issue, using this link http://guides.rubygems.org/ssl-certificate-update/#manual-solution-to-ssl-issue
we need to add GlobalSignRootCA.pem this certificate in ssl_certs folder insted of AddTrustExternalCARoot-2048.pem
go through that above link.
Your problem is most likely outdated SSL certificates included in installation.
This might help: https://gist.github.com/luislavena/f064211759ee0f806c88

rvm: certificate verify failed when installing Rails

For the first time, I am trying ruby-2.3.0. I installed it from rvm. After installation, I try to install Rails:
$ rvm-prompt
ruby-2.3.0#mygemset
$ rvm osx-ssl-certs update all
Updating certificates for /etc/openssl/cert.pem: Updating certificates in '/etc/openssl/cert.pem'.
Updated.
Updating certificates for /usr/local/etc/openssl/cert.pem: Already up to date.
$ rvm rubygems latest
Installed rubygems 2.5.1 is newer than 2.4.8 provided with installed ruby, skipping installation, use --force to force installation.
$ 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 returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
Why am I receiving the error certificate verify failed? When I navigate to the link https://api.rubygems.org/specs.4.8.gz on the browser, it downloads without problem.
Have a look here https://gist.github.com/luislavena/f064211759ee0f806c88 (see also Issue #1050 on the rubygems gem repo itself: https://github.com/rubygems/rubygems/issues/1050 if you want some great bedtime reading )
The gist (no pun intended) is that RubyGems had to update their SSL Certificate in a manner which was not deployable via rubygems itself.
You will need to do a 1 time manual installation / update of rubygems

Failed to Install gem Install rails ERROR Could not find a valid gem 'rails'

gem install rails -v 3.2.14
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://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz)
Maybe you want to try install ruby with rbenv very easy to use and update:http://octopress.org/docs/setup/rbenv/
I believe your machine is running on secure VPN. In my case I experienced same error whenever I try to install any gem while I am connected to secure VPN. Try to disconnect from VPN and try to install the rails gem again.
Hope it helps!!

installing rails unable to download data

I'm trying to install rails on a new computer and am running to the following command issue:
gem install rails
ERROR: Could not find a valid gem 'rails' (>= 0), here is why:
Unable to download data from http://gems.rubyforge.org/ -SSL_connect reuterned=1 error=0 state=SSLv2/v3 read server hello A: Unknown protocol (http://gems.rubyforge.org/latest_specs.4.8.gz)
Make sure you are using the latest rvm than you can update your certificates and rubygems. Or just use the non-ssl source.

Unable to install gems

I am unable to install gems, what changes do I need to do in my settings of browser to get downloaded? I am using Windows 7
C:\Users\MAX JOHN>gem install rails --no-ri --no-rdoc
ERROR: Could not find a valid gem 'rails' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (https://ruby
gems.org/latest_specs.4.8.gz)
C:\Users\MAX JOHN>gem install mysql
ERROR: Could not find a valid gem 'mysql' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (https://ruby
gems.org/latest_specs.4.8.gz)
setting the source to http instead of https is not recommended as it creates security issues.
Try pinging https://rubygems.org, this will tell you if the problem is with your connection issues or not.
Assuming you're using Rails 3, have a look at this post on how to set up WEBrick to use SSL:
http://www.nearinfinity.com/blogs/chris_rohr/configuring_webrick_to_use_ssl.html
Do you have more than one version of Ruby installed? I accidentally upgraded without removing a prior installation, and removing that fixed the same issue for me.
I had similar problem, and solved it by:
Downloading the gem via web browser from https://rubygems.org/
Install it locally by cd ing into the dir where the gem was downloaded and ran:
gem install --local .gem

Resources