puma gem - Failed to build gem native extension

前端 未结 13 743
广开言路
广开言路 2020-12-02 10:53

I was getting the following error while installing puma gem

    $ gem install puma
    Fetching: puma-2.11.2.gem (100%)
    Building native extensions.  This coul         


        
13条回答
  •  遥遥无期
    2020-12-02 11:15

    Run brew info openssl and follow the instructions there. Do not try to --force link the latest openssl with the one that comes installed with OSX by default. (0.9.8)

    Specifically it'll ask you to add the Homebrew version of openssl (should be 1.0.2 as of this date) into your $PATH.
    echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

    Note: Make sure to remove any export PATH lines from the bash_profile, since this line above exports it for you appending the rest of the $PATH variable to the end. To view the bash profile use vi ~/.bash_profile

    This fixed the problems for installing ruby gems that require compilation. (Puma in this case)

提交回复
热议问题