nio4r “Failed to build gem native extension.”



This content originally appeared on DEV Community and was authored by Saad Shakil

In an RoR project, bundle install was giving:

Installing nio4r 2.5.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

The following commands fix this:

bundle config build.nio4r --with-cflags="-Wno-incompatible-pointer-types"
gem install nio4r -v 2.5.8 -- --with-cflags="-Wno-incompatible-pointer-types"


This content originally appeared on DEV Community and was authored by Saad Shakil