Search code examples
ruby-on-railsrubygemsbundle

bundle install gem could not find unf_ext


A test project I'm trying to get working has a dependency on the unf_ext 0.0.7.4 gem being installed and I'm having trouble with it.

If I run bundle install I get:

<some packages>
Using unf_ext 0.0.7.4
<some package>

Bundle complete! 6 Gemfile dependencies, 27 gems now installed.

but if I then do bundle info unf_ext I get:

Resolving dependencies...
Could not find unf_ext-0.0.7.4 in any of the sources

If I try gem install unf_ext I get

could not create makefile

and when I open the mkmf.log file it says:

checked program was:

/* begin */

1: #include "ruby.h"
2: 
3: #include <ruby.h>
4: int main(int argc, char **argv)
5: {
6:   return 0;
7: }
/* end */

If I run sudo gem install unf_ext I get:

Building native extensions.  This could take a while...
Successfully installed unf_ext-0.0.7.4
Parsing documentation for unf_ext-0.0.7.4
Done installing documentation for unf_ext after 0 seconds
1 gem installed

but then gem list doesn't contain unt_ext.

Anyone know why it's not installing despite seemingly suggesting that it is?


Solution

  • I had exactly same errors and only this solution helped me.

    So in my case the cause was too old ruby version (< 2.7). All work as expected after updating ruby. But ensure that new ruby version is actually used as system one. I've used rbenv to manage versions.