I am new to Ruby on Rails. Till now I was using cloud9 online development environment. Recently I thought of setting up the environment locally(Windows 8). I installed ruby on rails using the railsinstaller. Then i cloned my repository onto my system. There was no error to this point. When I run the command bundle exec rake test I get
Could not find rake-10.4.2 in any of the sources.
Run `bundle install` to install missing gems.
Then I tried installing rake with command gem install rake -v '10.4.2'. I got
ERROR: Could not find a valid gem 'rake' (>= 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)
What should I do?
Replace the ssl gem source with non-ssl as a temp solution:
gem sources -r https://rubygems.org/
gem sources -a http://rubygems.org/
From your log, it seems your server has some connection issues with the rubygems.org using SSL. That prevent you from instaling rake gem.
As a workaround, you can do like this:
Open Gemfile, change https://rubygems.org/ to http://rubygems.org and then issue command gem install rake -v '10.4.2' again, good luck!
Related
Tried to bundle install in my first ruby project, doing a tutorial so i'm pretty new to all of this coding stuff. I was following part of the tutorial and everything was going fine until I encountered this:
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
An error occured while installing rake <10.4.2>, and Bundler cannot continue.
Make sure that 'gem install rake -v '10.4.2' succeeds before bundling.
Please explain in layman terms
Make sure that 'gem install rake -v '10.4.2' succeeds before bundling.
Type gem install rake -v '10.4.2 in to your command line and it'll install the rake gem.
Gems are simply other Ruby programs you can add to use within your program. See here: https://rubygems.org/ and here: https://en.wikipedia.org/wiki/RubyGems
When I run bundle install on ruby 2.1.2 I get:
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.
When I run gem install rake I get:
ERROR: Could not find a valid gem 'bundle' (>= 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
When I run which bundle I get:
/usr/local/rvm/gems/ruby-2.1.2#global/bin/bundle
This error is preventing me from doing development work on localhost:3000 before deploying.
Does anyone know how to resolve this issue?
In the Gemfile in your rails application directory change:
source 'https://rubygems.org'
to
source 'http://rubygems.org'
Upgrade to the latest version of Ruby or at least a newer version than the one you have. I was using 2.0.0-p247 and received the same error. When I upgraded to 2.2.5 (which is the oldest supported version at the time of this writing) then everything worked.
I also had to run gem install bundler after upgrading ruby. Last, I'm using rbenv and installed ruby with rbenv install 2.2.5 then ran rbenv local 2.2.5.
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 have an existing project which is stored on bitbucket, and just cloned that onto my windows box.
I enter the main project directory and run
rails server
I get the message:
Could not find rake-10.4.1 in any of the sources
Run `bundle install` to install missing gems.
so I run bundle install - which responds:
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.1.gem)
An error occurred while installing rake (10.4.1), and Bundler cannot continue.
Make sure that `gem install rake -v '10.4.1'` succeeds before bundling.
So I run command
gem install rake -v '10.4.1'
Which responds:
ERROR: Could not find a valid gem 'rake' (= 10.4.1), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://api.rubygems.org/specs.4.8.gz)
I read some other posts and people were asked to run this command:
ruby -ropenssl -e 'p OpenSSL::OPENSSL_VERSION'
Which responds:
"OpenSSL 1.0.0o 15 Oct 2014"
Please can somebody guide me as to what is wrong here!
This seems to be some longstanding issue with Ruby on windows.
I solved it by following these windows fix instructions:
https://gist.github.com/fnichol/867550
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