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

后端 未结 9 1719
青春惊慌失措
青春惊慌失措 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:03

    My son fixed this problem for me. The problem was that I installed first, Ruby and then the Rails installer. So I had to uninstall Ruby and reinstall with the Rails installer only.

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

    Remove the Gemfile.lock and run bundle install command

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

    Solution for Fedora 64bit

    sudo dnf install redhat-rpm-config
    
    0 讨论(0)
  • 2020-12-10 06:06

    I am facing the same issue while I was trying to upgrade my Rails to V5.0.0, I follow this instruction and it works perfectly. Read the section "Install the Ruby DevKit" here >> http://jekyll-windows.juthilo.com/1-ruby-and-devkit/

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

    I came across this problem as i was setting up rails too. (looking for an alternative to php).

    • I realized that i had installed x86 ruby with x64 Devkit, so i first downloaded x64 ruby which i installed and uninstalled the x86 version. I made sure my path variables were well set.
    • Then i installed devkit using the instructions on this page http://rubyonwindowsguides.github.io/book/ch02-04.html
    • Finally i installed rails and it worked fine without the errors this time

    Hope this helps

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

    If you use Windows and installed ruby with RubyInstaller with version more or equal to 2.4, than you should not install DevKit from RubyInstaller website and only use 'msys64' which is installed after Ruby with RubyInstaller (make sure you type number 3 to install both msys and mingw). Delete devkit directory and its path from PATH environment variable, so when rubygems will try to install nio4r and call C compilers, it will call msys ones. Read here https://rubyinstaller.org/2017/05/25/rubyinstaller-2.4.1-1-released.html for more info about MSYS2 and DevKit in RubyInstaller

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