Problems creating a new Rails project: "There is a chance that you are experiencing a man in the middle attack,"

I have never seen this before, and a simple Google search for this exact message causes nothing. Stack overflow

run bundle install Fetching source index from https://rubygems.org/ Resolving dependencies... 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 sources and change 'https' to 'http'. 

I followed the instructions on this page and came up empty-handed:

http://www.beginnerruby.com/rails-troubleshooting/fixing-opensslbundler-issue-for-rails-on-debian/

Does anyone have any ideas?

Mac OSX Lion using RubyMine.

+4
source share
5 answers

I followed these instructions with no visible results. While reading the comments, someone asked if the terminal was reopened. So, I closed / opened the terminal. This fixed my problem. I am using SnowLeopard.

 $ brew update $ brew install openssl $ brew link openssl --force $ brew install curl-ca-bundle $ brew tap raggi/ale $ brew install openssl-osx-ca 
+4
source

I think the interpretation of the exception should be simple (although I might be wrong) source ' https://rubygems.org ' at the top of your Gemfile: source ' http://rubygems.org '

+3
source

Make sure you are using rvm .

First install the OpenSSL rvm package:

 rvm pkg install openssl 

Then reinstall your ruby ​​version (in my case 2.0.0p247), pointing to this package:

 rvm reinstall 2.0.0-p247 --with-openssl-dir=$HOME/.rvm/usr 

Leave the current project folder and enter it again:

 cd . 

Now you can run bundle install :

 bundle install 
+1
source
0
source

In case someone has similar problems:

By running:

sudo rvm osx-ssl-certs status all

you will probably see that your certificates are out of date. He will say something like this:

Certificates for /System/Library/OpenSSL/cert.pem: Old. .

You need to update, so run this:

sudo rvm osx-ssl-certs update all .

Re-enabling the status command should give something like:

Certificates for /System/Library/OpenSSL/cert.pem: Up to date.

Happy days, the problem is fixed.

0
source

All Articles