简体   繁体   中英

An error occurred while installing nio4r (2.3.1) - fresh rails install

I'm installing rails on a new machine (high sierra to be exact) i've gone through the setup rails from go rails, however whenever i go to bundle install this is the following error:

Errno::EACCES: Permission denied @ dir_s_mkdir - /Users/jake/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/nio4r-2.3.1
An error occurred while installing nio4r (2.3.1), and Bundler cannot continue.
Make sure that `gem install nio4r -v '2.3.1'` succeeds before bundling.

I've downloaded command line tools, i've downloaded xcode (the actual app) I also accidentally downloaded postgres (via command line) first, before mysql. I'm unsure whether this has anything to do with it

thanks in advance!

It appears i've installed nio4r-2.3.1 in sudo, and therefore didn't have the correct permissions to access it when not in sudo. i ran the following command to change the directory:

sudo chown -R jake ~/.rbenv

big thanks to The Tin Man for his details post on this: - How to fix a bundle install "nio4r error" on Rails 5.0.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM