ruby bundler openssl error - ruby

i have bundle 1.3.0, rubygems 2.00, ruby 1.9.3p392 with rvm 1.18.15 on a debian squeeze machine
when doing bundle install with the following sources in the Gemfile:
source 'https://rubygems.org'
source 'https://ourgemserver.ourcompany.com'
I get
.../.rvm/gems/ruby-1.9.3-p392#global/gems/bundler-1.3.0/lib/bundler/vendor/net/http/persistent/ssl_reuse.rb:70:in 'connect':
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
while gem install <one of the gems in gemfile> works without any problems
I have tried putting the certificate from http://curl.haxx.se/ca/cacert.pem into .rvm/usr/ssl/cert.pem without any effect.
also, bundler doesn't seem to honor :ssl_verify_mode: 0 in the user home's .gemrc
any further hints?

On OS X 10.7.5, I solved the same error by updating openssl and adding the following to .bash_profile:
export SSL_CERT_FILE=/path/to/ca-bundle.crt

Related

gem install sass error

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/

Ruby Certificate Error

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

ruby gem on windows 10 not working

I am trying to install sass with ruby on my windows machine gem install sass but it is not working.
I get the following error:
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)
After googling around I found this workaround:
https://gist.github.com/luislavena/f064211759ee0f806c88
The thing is that I already have an AddTrustExternalCARoot-2048.pem in my ssl_certs directory.
gem --version shows 2.4.5.1
I am using windows 10 and downloaded the installer from ruby website: http://rubyinstaller.org/downloads/
ruby -v shows ruby 2.2.5p319 (2016-04-26 revision 54774) [i386-mingw32]
What can I do?
You can go into your gemfile and change the source to http://rubygems.org (lose the https://).

Error with command: 'rails new "project name"'

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.

I am getting error while installing json by gem using Ruby

I have Downloaded Ruby 2.1.5
cmd check command: ruby -v returns result: ruby 2.1.5
Downloaded DevKit file from here DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe
Extract DevKit to path C:\Ruby\DevKit
cd C:\Ruby\DevKit
ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
Up till this point, everything is okay but from now onward I am getting error.
I am passing from command
cmd : gem install json
and getting following 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=SSLv3 read server certificate B: certificate verify faild(https:api.rubygem.org/specs.4.8.gz)
This is a pretty common issue with rubygems recently changing their certificate authority.
A detailed breakdown of the issue, and how to resolve it can be found here.

Resources