21

So when I try running bundle install --without production it tells me that I am getting an error and that I need to Make sure that gem install unf_ext -v 0.0.7.2 succeeds before bundling. I have not gotten this error before while installing other gems, but only when I try and install gem stripe(which is used for receiving user payments and such).

Could someone explain what could be causing this kind of problem. All help is greatly appreciated.

Thanks, -Aaron

EDIT

What I did to solve my problems was updating all of my gems to their current and latest version. Then when I ran bundle install --without production everything seemed to install perfectly fine after that.

beastlyCoder
  • 2,349
  • 4
  • 25
  • 52

12 Answers12

16

This error can come across due to various reasons, so it's not easy to tell what might have really caused, preventing you from bundle install, so try the following fixes, if not worked please give more details on errors that appears :) If the error was because of missing gmkdir, then run the following command:

brew install coreutils

If the error was due to missing C++ headers related then run the bellow command:

yum install gcc-c++

Also have a look at the developer's home page given below to check you meet all dependencies required:

unf_ext 0.0.7.2 : Unicode Normalization Form support library for CRuby

Praveen George
  • 9,237
  • 4
  • 26
  • 53
  • 1
    Thanks For the help, I eventually found out that it was because my rails gem wasn't upgraded. Everything works now :) – beastlyCoder Feb 21 '16 at 03:08
  • 1
    Can you please post the steps you did to solve your problem as an answer here, as it help other with same problem. – Praveen George Feb 21 '16 at 06:13
  • worked for me using the brew install coreutils suggestion above on El Capitan. – Terry Ray Nov 01 '16 at 21:32
  • Thanx your solution worked but in a different manner actually i am getting error "need to install development tools first" although my system is fully setup and suddenly it is giving this error while running bundle install. Then i tried your command brew install coreutils and it asked me to run sudo xcodebuild -license accept. Al set and evrything is running fine now. – Amit Sep 25 '17 at 13:28
  • `brew install coreutils` worked for me on Big Sur 11.2 – Raunaq Feb 25 '21 at 18:06
12

After updating to Mojave MacOS version, the ruby 'lost' the reference.

To solve

$ rvm list

In my case, the version listed was:

ruby-2.5.1 [ x86_64 ]

$ rvm use ruby-2.5.1 to change to 'current' version used

$ rvm list again to see the current version

=> ruby-2.5.1 [ x86_64 ]

After that everything are okay running bundle install or bundle update or gem install or gem update

Ronaldo Albertini
  • 1,329
  • 20
  • 24
  • 2
    thanks, this also solved it in my case. My default was set to `ruby-2.3` which I guess is not compatible with this gem. – lifeofguenter Dec 18 '18 at 09:35
3

I just have the same problem when i try to install vagrant plugin, you need to install ruby-devel before. Hope this help you.

AnTSaSk
  • 410
  • 3
  • 6
  • Thanks For the help, I eventually found out that it was because my rails gem wasn't upgraded. Everything works now :) – beastlyCoder Feb 21 '16 at 03:08
2

I ran into this deploying to a remote box. As suggested in comments, I was able to fix it by opening a console session on the affected box and running:

gem update rails
gem install unf_ext -v '0.0.7.2'

And I was then able to deploy successfully.

Kimball
  • 1,241
  • 11
  • 17
2

I resolved this issue by upgrading bundler. Simply run:

gem install bundler

which fetches the latest bundler. Then, try running:

bundle install
Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113
Anji
  • 49
  • 2
1

I got same problem. It happens after I upgrading my macOS to newer version. Somehows, upgrading mess up /usr/local/include. So that I removed it and run install. It worked

sudo mv /usr/local/include/ /usr/local/include.delete_me
Phan Hai Quang
  • 709
  • 6
  • 7
1

Similar to the comment of Luke, xcode-select did the job for me. But instead of switching it to a different location, I just reverted the selected version to default, although I cannot remember to ever have changed it.

sudo xcode-select -r

After that bundle install and bundle update worked fine for me again.

radius
  • 21
  • 1
0

I was having the exact same issue trying to install this specific gem and version as well. Turns out my VPS would run out of RAM while compiling and quit. I just killed off a few processes I could live without for a few minutes and it worked...

penner
  • 2,707
  • 1
  • 37
  • 48
0

I solved this issue by running

sudo xcodebuild -license

  • Thanks. This indeed fixed i for me as well. Do you *why* this works on a technical level? – Kymer Jan 30 '19 at 10:51
0

I was working with docker and docker compose. similar issue arised to me. I deleted the image, removed all associated containers with the application and rebuilt the image with docker build . created the container with docker-compose up inside the working directory and it started working. this solution is specific to those using docker and docker-compose. Hope it helps someone. I am still not sure about the reason why is this happening.

GemNotFound: Could not find unf_ext-0.0.7.7 in any of the sources

Parikshit Singh
  • 167
  • 3
  • 4
0

this can be solved installing ruby-dev and then gem install unf_ext -v 0.0.7.2

rüff0
  • 906
  • 1
  • 12
  • 26
0

I ran into this issue getting

    Installing unf_ext 0.0.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/jfn0296/.rvm/gems/ruby-3.0.0/gems/unf_ext-0.0.8/ext/unf_ext
/Users/jfn0296/.rvm/rubies/ruby-3.0.0/bin/ruby -I /Users/jfn0296/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0 -r
./siteconf20220120-59736-elnfu0.rb extconf.rb
checking for -lstdc++... yes
creating Makefile

current directory: /Users/jfn0296/.rvm/gems/ruby-3.0.0/gems/unf_ext-0.0.8/ext/unf_ext
make "DESTDIR=" clean

current directory: /Users/jfn0296/.rvm/gems/ruby-3.0.0/gems/unf_ext-0.0.8/ext/unf_ext
make "DESTDIR="
compiling unf.cc
make: *** [unf.o] Error 1

make failed, exit code 2

After trying many of these listed, using rvm I uninstalled and reinstalled my ruby-3.0.0 and tried bundling again and this time it worked. Did not see a solution like that here so I thought I'd share.

Jack
  • 21
  • 1
  • 5