Error installing Bundler

后端 未结 13 949
感情败类
感情败类 2020-12-05 07:17

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         


        
相关标签:
13条回答
  • 2020-12-05 07:25

    I faced the same problem installing bundler on windows 8.1. I solved it and installed bundler and other gems in the following way

    1. Go to https://gist.github.com/luislavena/f064211759ee0f806c88 and follow instructions.
    2. My gem version was 2.2.2. Update gem to 2.4.5 with the command:

      gem update --system

    3. Install gems:

      gem install bundler

      gem install rails

    Hope that helps.

    0 讨论(0)
  • 2020-12-05 07:25

    Below way solve my problem:

    1. In the home directory , find file .gemrc
    2. edit this file and find

      :sources: -https://rubygems.org/

    3. change https into http

    4. save the file and reopen the shell.
    0 讨论(0)
  • 2020-12-05 07:26

    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.

    0 讨论(0)
  • 2020-12-05 07:26

    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! ★

    0 讨论(0)
  • 2020-12-05 07:28

    Try gem source -c and then install bundler again that should solve the problem

    0 讨论(0)
  • 2020-12-05 07:30

    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).

    0 讨论(0)
提交回复
热议问题