title: Ruby on rails : problem of verifiying the SSL certificate while installing bundle
body: <p>I'm new with ruby on rails and while creating my first project with this command <code>rails new n_project</code>, i got this error</p>
  <pre><code>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 .... 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 .... 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 .... 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 ...
  </code></pre>
  <p>I tried changing https to http in Gemfile and execute only <code>bundle install</code> but the problem wasn't solved . This message appears instead:</p>
  <pre><code>Fetching gem metadata from http://rubygems.org/.
  Retrying dependency api due to error (2/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://index.rubygems.org/api/v1/dependencies?gems=rails%2Csqlite3%2Cpuma%2Csass-rails%2Cuglifier%2Ccoffee-rails%2Cjquery-rails%2Cturbolinks%2Cjbuilder%2Cbyebug%2Cweb-console%2Ctzinfo-data.
  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 .... To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
  Retrying dependency api due to error (3/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://index.rubygems.org/api/v1/dependencies?gems=rails%2Csqlite3%2Cpuma%2Csass-rails%2Cuglifier%2Ccoffee-rails%2Cjquery-rails%2Cturbolinks%2Cjbuilder%2Cbyebug%2Cweb-console%2Ctzinfo-data.
  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 .... To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
  Retrying dependency api due to error (4/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://index.rubygems.org/api/v1/dependencies?gems=rails%2Csqlite3%2Cpuma%2Csass-rails%2Cuglifier%2Ccoffee-rails%2Cjquery-rails%2Cturbolinks%2Cjbuilder%2Cbyebug%2Cweb-console%2Ctzinfo-data.
  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 .... To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
  </code></pre>