Error installing nio4r

At first try to install build essentials:

sudo apt-get install build-essential patch

and if still don't work try to install ruby-dev:

sudo apt-get install ruby-dev zlib1g-dev liblzma-dev

regards


The root cause of this error message for me was that Xcode updated and I had not accepted the new license agreement yet, so (for some reason) it restricted access to CLT (Command Line Tools -- this is what the xcode-select --install command installs).

If you already have CLT installed, you may need to run the following to get them to work:

sudo xcodebuild -license accept

This is what fixed my issue; I hope it helps someone else.


I am on mac and I fixed it by typing the following code

xcode-select --install
gem install rails