Error when creating new project - ruby-on-rails

I am attempting my first Ruby on Rails project and when I ran my rails new (projectname) command, I got the following error in command prompt.
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0
state=SSLv3 read server certificate B: certificate failed
(https://rubygems.org/gems/rake-10.4.2.gem)
An error occurred while installing rake (10.4.2), and Bunderler cannot
continue. Make sure that gem install 'gem install rake -v 10.4.2
succeeds' before bundling`
If I'm not mistaken, it looks like it cannot download the Ruby gem for "rake" because the SSL certificate at the URL is not trusted. Is there a way to install without SSL or to make the SSL cert a trusted certificate?
If I'm incorrect in my assumption about the error, can someone point me in the right direction to fix this please? Any help would be greatly appreciated.

Related

Failed to Install gem Install rails ERROR Could not find a valid gem 'rails'

gem install rails -v 3.2.14
ERROR: 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://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz)
Maybe you want to try install ruby with rbenv very easy to use and update:http://octopress.org/docs/setup/rbenv/
I believe your machine is running on secure VPN. In my case I experienced same error whenever I try to install any gem while I am connected to secure VPN. Try to disconnect from VPN and try to install the rails gem again.
Hope it helps!!

Errors beginning with Ruby on windows

I have the following error. Could you please let me know how to solve them?
Many thanks in advance.
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.
C:\Sites\firstTest>gem install rake -v '10.4.2'ERROR: While executing gem... (Encoding::UndefinedConversionError) U+00E9 to IBM866 in conversion from UTF-16LE to UTF-8 to IBM866
You may need to manually upgrade your rubygems version as explained here: unable-to-pull-data-from-https-rubygems

Ruby on rails windows installed using railsInstaller fails to install gems / bundles

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

Following RailsBridge Installfest for Windows 8.1 - Failed Installing Ruby

I am new to this forum and web development :-) Career change.... I am having problems with the installation. I am following the instructions from Railsbridge Installfest for MS Windows.
I am now stuck at Create a Rails app, step rails new test_app. Everything else so far has installed without any issues. I get the following output and error:
run 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.
I would appreciate help in what I need to do next. I am not very technical and would love some assistance! Thanks a lot.

bundle install: Gem::RemoteFetcher::FetchError: SSL:...certificate verify failed

In Windows, when upgrading to rails. 4.1.0.beta1, bundle install creates an error with gem minitest:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.r
ubygems.org/gems/minitest-5.2.1.gem)
Similar error happened before and we usually got around by trying to install an older version. But this time minitest 5.2.0 has the same error. What's the cause of this error and how to fix it?
#bjhaid needs to write his comment above here as an answer, as that's the answer.
"change source 'https://rubygems.org' to source 'http://rubygems.org' in your Gemfile"

Resources