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.
Related
OS: Mac Catalina 15.5.5
Ruby: 2.7.1
Rails: 6.0.2.2
I was trying to uninstall the MySQL Gem and re-install it:
gem uninstall mysql2
Response:
Successfully uninstalled mysql2-0.5.3
brew upgrade openssl
Response:
openssl 1.1.1g already installed
gem install mysql2 -v 0.5.3 -- --with-opt-dir="$(brew --prefix openssl)"
Response:
ERROR: Could not find a valid gem 'mysql2' (= 0.5.3), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect SYSCALL returned=5 errno=0 state=SSLv3/TLS write client hello (https://rubygems.org/specs.4.8.gz)
This is not just for the MySQL gem. I tried creating a new Rails app, and when it tries to do the bundle, I get the same error about nor being able to access rubygems.org
Any ideas?
Solution:
Turns out it's a problem with the Kaspersky Internet Protection product. Out of the blue, it updated and decided to start blocking https connections. I've had so many problems with this product and regret having it installed, but don't think I can be without malware protection.
I have a new install of Ubuntu 18.04. I am trying to install everything I need for Ruby on Rails, but whenever I use the gem command I get a timeout error, like this:
chris#linuxbox:~/Sites$ gem install bundler
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - timed out (https://api.rubygems.org/specs.4.8.gz)
But if I paste that URL into my browser, I get the file right away!
Why can't I connect from the command line?
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.
I have been trying to install Rails on my Windows PC for the past days. I got the bundle from www.railsinstaller.org and it installed great. When creating a new application I can see that all the app files are created then I get the following error:
bundle install
DL is deprecated, please use Fiddle Fetching gem metadata from
https://rubygems.org/.......... Resolving dependencies...
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0
state=SSLv3 read server certificate B : certificate verify failed
(https://rubygems.org/gems/rake-10.4.2.gem) An error occurred while
installing rake (10.4.2), and Bundler cannot continue. Make sure that
gem install rake -v '10.4.2' succeeds before bundling.
Hoping someone can help with resolving this.
This link could be helpful.
Creating a Ruby on Rails environment on Windows, in a VM Vagrant Box
Instead of install ROR directly onto Windows, you might want to use a Linux like OS. Not because Rails environment cannot be setup in Windows. But all the problems you will encounter, especially when most of tools are designed for that when you are not using a Linux like OS and try to mimic that.
But I highly recommend you skip doing all that if you are just trying to learn, and use Nitrous.io, which is an online IDE that gives you all the tool.
IMHO, dealing with Windows in this case is a waste of time.
First message:
DL is deprecated, please use Fiddle Fetching gem metadata ..
is a warning message. You read about it here.
The main error is encountered while installing rake.
An error occurred while installing rake (10.4.2), and Bundler cannot
continue. Make sure that gem install rake -v '10.4.2' succeeds before
bundling.
To solve this, you should first update Rubygems:
gem update --system
And then update Bundler:
gem install bundler
I simply run
gem update --system
and it fixed. More info please check bundle install fails with SSL certificate verification error
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