Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
An error occurred while installing nio4r (2.1.0), and Bundler cannot continue. (Ubuntu) #159
Comments
|
This is almost certainly a misconfiguration in your local environment preventing any native extensions from compiling.
Please follow the instructions in the error message:
/usr/lib/ruby/2.4.0/mkmf.rb:457:in `try_do': The compiler failed to generate an
executable file. (RuntimeError)
You have to install development tools first.
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/home/deploy/app/tmp/build-15002732108911/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/nio4r-2.1.0/mkmf.log
|
aruprakshit
commented
Jul 17, 2017
|
Please check the mkmf.log file for the error |
tarcieri
closed this
Jul 17, 2017
aruprakshit
commented
Jul 17, 2017
|
@tarcieri Was that quick close was required? |
|
This is almost certainly not an issue with nio4r but one in your Ruby environment, so yes. |
aruprakshit
commented
Jul 17, 2017
•
|
@tarcieri Ok fine. I think the gem lacks good documentation. It should mention required packages it needs to get compiled. If I look at the internet, many people faced it when upgraded to Rails 5. It will be good to have a documentation like this. |
|
This gem is dependency-free aside from a Ruby environment which can compile
C extensions.
Rails depends on several gems with C extensions. This just happens to be
the one your install failed on.
--
Tony Arcieri
|
aruprakshit
commented
Jul 17, 2017
|
Sorry, it is not me. It is many people faced it. You can see -> link. |
|
You'll find similar issues for any C extension Rails depends on, e.g.
https://www.google.com/search?q=error+occurred+installing+unf_ext&oq=error+occurred+installing+unf_ext
In all of these cases, the issue is not with the gems, but with the Ruby
environment.
The real issue here is you did not read the error message, which explained
your environment was not set up correctly.
The resolution is to fix your environment. I have tried to point you in the
right direction there.
--
Tony Arcieri
|
swarzynski
commented
Aug 23, 2017
|
I had same error. In my case it was because nio4r required libgmp3-dev package. |
|
@swarzynski nio4r absolutely does NOT have any dependency on libgmp3, it is entirely self-contained and only depends on a C compiler. Installing libgmp3 likely fixed compilation of a completely different native dependency in your app, not nio4r |
stevedundee
commented
Sep 14, 2017
|
@swarzynski I suspect that when you installed libgmp3-dev, apt also installed ruby-dev as a dependency. I was getting the same nio4r problem as you until I installed ruby-dev - the problem was that the ruby headers were missing. |
oquidave
commented
Oct 3, 2017
|
@swarzynski solution of installing ruby-dev worked for me |
ehalferty
commented
Oct 30, 2017
•
|
Same here. The |
|
Yes, Rails 5 includes several native extensions, one of which is this gem. |
aruprakshit commentedJul 17, 2017
My System is ubuntu
When I do
bundle exec mina deploy, got error as below:I tried
sudo apt-get install ruby-dev zlib1g-dev liblzma-devfrom link, but no luck. How can I fix this?