rails 5.0.0 when installing “nio4r” : Failed to build gem native extension

后端 未结 9 1720
青春惊慌失措
青春惊慌失措 2020-12-10 05:30

Here is the logs: http://pastebin.com/CAgur9xd

Installing nio4r 1.2.1 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extensi         


        
相关标签:
9条回答
  • 2020-12-10 06:18

    I had a similar problem and running this command solved my issue.

    bundle config build.nio4r --with-cflags="-std=c99"
    

    Now you can successfully run bundle install afterwards.

    0 讨论(0)
  • 2020-12-10 06:23

    Had this same issue on Ubuntu 16.04. What I did to fix this :

    Remove Gemfile.lock : sudo rm Gemfile.lock Installed Ruby-Dev:

    sudo apt-add-repository ppa:brightbox/ruby-ng sudo apt-get update sudo apt-get install ruby2.4-dev

    and the important step : REBOOT!

    0 讨论(0)
  • 2020-12-10 06:24

    To quote from your log output:

    The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.

    On windows, you need to install the DevKit in order to be able to compile gems.

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