Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read

I am trying to install ruby on rails but I keep on getting so many errors when I am trying to create an application.

Here is what I did on my Windows machine:

1) Downloaded railsinstaller-3.0.0.exe software 2) Installed Rails on my machine. 3) Verified that installation is successful:

E:\Rails>ruby -v ruby 2.0.0p598 (2014-11-13) [i386-mingw32]

E:\Rails>sqlite3 --version 3.8.7.2 2014-11-18 20:57:56 2ab564bf9655b7c7b97ab85cafc8a48329b27f93

E:\Rails>rails -v DL is deprecated, please use Fiddle Rails 4.1.8

Now when I am trying to create an application I am getting below exception:

Command used is: rails new blog

         run  bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/...........
Fetching additional 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.

Now I tried to run this command - gem install rake -v '10.4.2', I started getting below error now:

E:\Rails>gem install rake -v '10.4.2'
ERROR:  Could not find a valid gem 'rake' (= 10.4.2), 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://rubygems.org/specs.4.8.gz)

I am completely stuck here, can you please tell where I am making mistake in this installation? I tried various options given in SO but I am failing all the times.

If I try to start the server then I am getting below exception:

E:\Rails> cd blog
E:\Rails\blog>rails server
Could not find gem 'tzinfo-data (>= 0) x86-mingw32' in the gems available on this machine.
Run `bundle install` to install missing gems.

Now if I run bundle install I am getting new error:

E:\Rails\blog>bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/...........
Fetching additional 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.

Again if I try to install rake I am getting new exception:

E:\Rails\blog>gem install rake -v '10.4.2'
ERROR:  Could not find a valid gem 'rake' (= 10.4.2), 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://rubygems.org/specs.4.8.gz)

I am trying this for the past 2 days, but still I a not able to understand where I am doing mistake in installation.

like image 552
learner Avatar asked May 08 '15 01:05

learner


1 Answers

Update your GemFile: from

https://rubygems.org

to

http://rubygems.org  
like image 131
Nezir Avatar answered Oct 21 '22 04:10

Nezir