0

I am not able to create RubyOnRails projects. When I run rails new miBlog, I get this:

         run  bundle install
Fetching source index from https://rubygems.org/

Retrying fetcher due to error (2/4): Bundler::Fetcher::CertificateFailureError 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 http://bit.l/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (3/4): Bundler::Fetcher::CertificateFailureError 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 http://bit.l/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (4/4): Bundler::Fetcher::CertificateFailureError 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 http://bit.l/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
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 http://bit.l/ruby-ssl. To connect
without using SSL, edit your Gemfile sources and change 'https' to 'http'.

As you can see, there are errors.

I have Rails 5.1.3 and ruby 2.3.3p222.

How can I fix those errors, so I can create a project?

  • Did you see these suggestions? https://stackoverflow.com/questions/19150017/ssl-error-when-installing-rubygems-unable-to-pull-data-from-https-rubygems-o?rq=1 – Will Wilson Feb 10 '21 at 23:41

1 Answers1

0
  1. Use latest version of ruby, most probably between 2.5 to 3.0
  2. Check OpenSSL is installed in your system
  3. Check command line tools are installed or not, if not install the command line tools
  4. Check command line tools are upto date, if not update the command line tools
honey
  • 981
  • 6
  • 19