I am trying to install the Bundler gem on my Mac. With the command:
sudo gem install bundler
I get the following error:
ERROR: Could not find a
I faced the same problem installing bundler on windows 8.1. I solved it and installed bundler and other gems in the following way
My gem version was 2.2.2. Update gem to 2.4.5 with the command:
gem update --system
Install gems:
gem install bundler
gem install rails
Hope that helps.
Below way solve my problem:
.gemrc
edit this file and find
:sources: -https://rubygems.org/
change https
into http
After looking at some of the answers to the Stack question @Matt referenced, although the error was different, one of the solutions also helped me for this problem.
In the home directory, create a file called .gemrc
. Add :ssl_verify_mode: 0
to the file. Bundler then installs without issue.
This works for my situation as I'm behind a corporate firewall. However, this obviously opens up a security hole.
I had this same problem using Windows, and removing the security from the Hypertext Transfer Protocol solve it.
Paste in your terminal:
gem sources -r https://rubygems.org -a http://rubygems.org
Hope it will help! ★
Try gem source -c and then install bundler again that should solve the problem
Had the same issue and everything is described here: http://railsapps.github.io/openssl-certificate-verify-failed.html
tl;dr Recent versions of RVM, the Ruby Version Manager, include a utility to diagnose and resolve errors caused by outdated certificate files. See the article Installing Rails for instructions and advice. The RVM website explains how to install RVM.
If you’ve installed RVM, try this:
$ rvm -v
# rvm 1.19.1 (stable)
$ rvm osx-ssl-certs status all
# Certificates for...
$ rvm osx-ssl-certs update all
# Updating certificates...
That’s all that is needed to resolve the issue if you are using RVM (you must be using RVM version 1.19.1 or newer).