bundle install gem could not find unf_ext
Asked Answered
M

1

7

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?

Monocular answered 8/8, 2017 at 15:22 Comment(1)
I had to blow out my .bundle directory. Looks like it used to not be installed with "native extensions" and now it IS installed with "native extensions." Curse you, native extensions! Rargh!Felisha
E
1

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.

Earthward answered 28/4, 2023 at 11:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.