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
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
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
Specifying Content Type in Rspec
Rails Render of Partial and Layout in Controller
Ruby on Rails: How to Use Oauth2::Accesstoken.Post
Need to Use Add_Index on Migration for Belongs_To/Has_Many Relationship? (Rails 3.2, Active Record)
How to Deal with App_Key and App_Secret (Dropbox API)
Ruby: Uri::Invalidurierror (Uri Must Be Ascii Only
Rails Calculate Date Range in Months
Gem Which Cannot Find Gem Despite It Being Installed
How to Require a Block in Ruby
How to Integrate 'Premailer' with Rails
How to Get the Number of Elements Having Same Attribute in HTML in Watir
Upgraded to Ruby 1.9.2 and Getting Segmentation Fault Errors in Nokogiri