How to Fix a Bundle Install "Nio4R Error" on Rails 5.0.0

How to fix a bundle install nio4r error on Rails 5.0.0

I was able to fix the problem with:

brew update 

and

bundle update

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

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/

Gem::Ext::BuildError: ERROR: Failed to build gem native extension on macOS Monterey

It turns out the problem was that in the Gemfile.lock file, it was locked to using an older version of bundler. We simply deleted the Gemfile.lock, and re-ran bundle to regenerate Gemfile.lock. That solved it. It now says this at the bottom of the Gemfile.lock file, so it liked this version of bundler:

BUNDLED WITH
2.3.9

Bundle install: ERROR: Failed to build gem native extension. nio4r gem

I solved it with:

sudo apt-get install libmysqlclient-dev
sudo apt-get install libpq-dev
sudo apt-get install libsqlite3-dev
sudo apt-get install libev-dev
rvm use 2.0.0
Reboot pc

If I run rails -v shows me:

  • Rails 3.2.17

And now I can make Bundle install

I think the rails version was in conflict. I don't know why, maybe anyone can explain me.



Related Topics



Leave a reply



Submit