Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error occured while installing unf_ext (0.0.7.4), and Bundler cannot continue

My ultimate goal is to get this to work in an Ubuntu 14.04 Docker container: https://github.com/byalextran/autoluv

When I run

m1@9bdc67007b49:~/autoluv$ bundle install --deployment

It says:

Fetching unf_ext 0.0.7.4
Installing unf_ext 0.0.7.4 with native extensions
Errno::EACCES: Permission denied @ rb_sysopen - /home/m1/autoluv/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/.document
An error occurred while installing unf_ext (0.0.7.4), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/'` succeeds before bundling.

But when I run

sudo gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/'

unf_ext-0.0.7.4 installs fine?

Building native extensions.  This could take a while...                                                                             
Successfully installed unf_ext-0.0.7.4                                                                                              
1 gem installed                                                                                                                     
Installing ri documentation for unf_ext-0.0.7.4...                                                                                  
Installing RDoc documentation for unf_ext-0.0.7.4...

I cannot figure out the next step. I've tried installing ruby-dev and gcc, but neither has helped move this along :(

Any and all help is much appreciated!

like image 374
Michael Avatar asked Jan 29 '19 03:01

Michael


2 Answers

I had this same problem and the reason was that I did not installed all the dependencies that bundler needs to run

just try to:

sudo apt-get install build-essential

then run again

gem install bundler

and lastly

bundler
like image 69
Carlos Avatar answered Nov 19 '22 07:11

Carlos


There is a difference between running commands with sudo and without. You can get more info about this command here https://kb.iu.edu/d/amyi.

Errno::EACCES usually happens when bunder has no access to a needed folder or it doesn't exist.

Try to gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/' without sudo.

like image 2
Bohdan Sviripa Avatar answered Nov 19 '22 08:11

Bohdan Sviripa