How to fix a bundle install “nio4r error” on Rails 5.0.0

前端 未结 5 1468
谎友^
谎友^ 2021-01-02 04:58

The exact error is:

An error occurred while installing nio4r (1.2.1), and bundler cannot continue. Make sure that \'gem install nio4r -v \'1.2.1\'\' succeeds         


        
5条回答
  •  长发绾君心
    2021-01-02 05:40

    I was with the same error just now.. In my case, I had installed the ruby through the package: https://www.brightbox.com/blog/2017/01/13/ruby-2-4-ubuntu-packages/

    But, I had not installed the ruby-dev package.

    In my case: sudo apt-get install ruby2.4-dev worked for me.

    After installation I was able to compile the gem: nio4r

    I think you have to install some package ruby-dev => sudo apt-get install ruby-dev

提交回复
热议问题