2

On a Win7 machine

I am trying to install RoR and when I type:

rails new 'path'

everything seems to workout fine, but then all of a sudden I get the following message.

This message comes after it says run bundle install

"Could not verify the SSL certificate for https://rubygems.org/. There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ssl-certs. To connect without using SSL, edit your Gemfile and change 'https' to 'http'."

The answer could be to change https to http, but I cannot find the file to do it.

Thanks for your help.

MPL
  • 384
  • 1
  • 4
  • 20

2 Answers2

2

There is a file called Gemfile in the root directory of your new RoR project. It contains this line:

source "https://rubygems.org"

Just change that to

source "http://rubygems.org"

You will just have to run bundle install again afterwards

As a side note, you might seriously consider developing on a Linux VM. Windows RoR will be painful.

DVG
  • 17,392
  • 7
  • 61
  • 88
  • Yes you are probably right. I managed to install rails and am now working through the tutorial and get now an error that sqlite3 not part of the bundle is. – MPL Mar 04 '13 at 20:58
  • This is awful advice that goes against common sense. –  Mar 05 '13 at 10:18
  • It wasn't advice, he was asking where to change the https to http (which may be completely necessary in some scenarios, such as behind a corporate proxy) – DVG Mar 05 '13 at 13:36
1

Good SSL certificates are required to prove that the gems received are trustworthy enough for running code, depending on the intended use. Otherwise, you have a tiny but long-tail chance of downloading MITM modified code.

More than likely there is a problem with the Ruby installation... I had a problem on Mac with brew'd OpenSSL 1.0.1c instead of 1.0.1e.

http://railsapps.github.com/openssl-certificate-verify-failed.html

Be sure to use the latest 1.9.3 (p392 at time of writing) Ruby Installer until 2.0.0 matures.

http://rubyforge.org/frs/download.php/76798/rubyinstaller-1.9.3-p392.exe

And compare to the checksums here:

https://cdn.rubyinstaller.org/checksums/rubyinstaller-20130224.md5