Not able to add any gem sources thus can't do gem install. See command output
Adding using https://rubygems.org failed, see output
C:\>gem sources -a https://rubygems.org
Error fetching https://rubygems.org:
SSL_connect returned=1 errno=0 state=SSLv3 read server
certificate B: certificate verify failed
(https://api.rubygems.org/specs.4.8.gz)
Adding using http://rubygems.org failed, see output
C:\>gem sources -a http://rubygems.org
https://rubygems.org is recommended for security over http://rubygems.org
Do you want to add this insecure source? [yn] y
Error fetching http://rubygems.org:
server did not return a valid file
(http://api.rubygems.org /specs.4.8.gz)
No Sources In System, See Command Output
C:>gem sources
* CURRENT SOURCES *
gem 2.5.1 got installed due to MSI installer of ruby 2.3.1p112 on windows 10 x64 so we need to exclusively update gem version by gem install rubygems-update thereafter update_rubygems. This is available here
Related
I am trying to install sass and I tried ruby installer. I am getting the error as follow.Please anyone help.
C:\Ruby23-x64>gem install sass
ERROR: Could not find a valid gem 'sass' (>= 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/specs.4.8.gz)
gem install by default uses https://rubygems.org/ as it's source for gems, but you can specify the source using --source option and give a non-SSL source to install like following:
gem install sass --source http://rubygems.org/
I am trying to install a migration tool called move to go for a CRM system called Lime but I get an error. I dont know why, the certificate says it's valid in the SSL.
This is the step by step guide that I am executing:
https://github.com/Lundalogik/move-to-go/blob/master/step-by-step.md
and this is the documentation:
https://github.com/Lundalogik/move-to-go
C:\Users\gujo>gem install move-to-go
ERROR: Could not find a valid gem 'move-to-go' (>= 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)
Any suggestions?
This is due to Ruby SSL certificate that has changed.
You can install a newer version of RubyGem to fix the issue.
Example, on Windows:
Download https://rubygems.org/downloads/rubygems-update-2.6.7.gem and save it to C:\rubygems-update-2.6.7.gem
Open a command prompt and run the commands :
gem install --local C:\rubygems-update-2.6.7.gem
update_rubygems --no-ri --no-rdoc
gem --version and check it is 2.6.7
gem uninstall rubygems-update -x to remove the update package
Finally, retry your gem install command and the SSL error should be gone !
Source: http://guides.rubygems.org/ssl-certificate-update/#installing-using-update-packages
I've installed the ruby devkit on Windows 7 but it's unable to install json using the following command:
gem install json --platform=ruby
I'm getting this error:
ERROR: Could not find a valid gem 'json' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A:
unknown protocol (https://api.rubygems.org/specs.4.8.gz)
I'm on ruby 2.3.1p112 with RubyGems 2.5.1.
If you have a Gemfile, change the first line in Gemfile from https to http, it should do the trick.
Also, you can install gems global by creating a Gemfile and running bundle install from the directory the Gemfile is created. So, instead of using the gem install command, create a Gemfile and run bundle install in it.
This is the original
source 'https://rubygems.org'
gem 'test'
Change to
source 'http://rubygems.org'
gem 'test'
If you don't, you can pass the -s option to gem install and specify the url to http://rubygems.org
I am in need of using Sass in my web design projects. Whenever I want to install Sass using terminal an error appears as below:
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
SSL_connect SYSCALL returned=5 errno=0 state=unknown state (https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/sass-3.4.19.gemspec.rz)
I've tried updating SSL certificate update as explained in RubyGems Guides and I still have the error.
Actually, once I want to access any gem, I confront the error.
This is because of SSL security reasons, Try this Command
gem sources -a http://rubygems.org/
Do you want to add this insecure source? [yn]
give y
and then give install command
UPDATE:
How to fix error and get back to https with ssl:
gem sources -r https://rubygems.org/ - to temporarily remove secure connection
gem sources -a http://rubygems.org/ - to add an insecure connection with ruby
gem update --system - now you will be able to update rubygems without SSL
after updating rubygems you can do this vice versa
gem sources -r http://rubygems.org/ - to remove insecure connection
gem sources -a https://rubygems.org/ - add secure connection
Now you're able to update gems using secure connection.
gem update
DL is deprecated, please use Fiddle
Fetching gem metadata from ............
Fetching additional metadata from
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.
I have the same issue and i have solved it by upgrading to latest version,
Download latest rubygems package from rubygems
Unpack at your specific path like D:\Ruby\RubyGems.
Bring up your command line by following this Win + R, cmd , Enter
Go to the directly where you unpacked rubygems package to: cd D:\Ruby\RubyGems
Run ruby setup.rb
Let me know if it solve your problem.