Nokogiri's gem cannot be installed

Asked 2 years ago, Updated 2 years ago, 71 views

Nice to meet you, I'm a Ruby beginner.
I wanted to try scraping, so I tried to install Nokogiri's gem, but I got an error, and when I dealt with it, I ended up with the following error and I couldn't compete with it at all.
I would appreciate your cooperation.><

$gem install nokogiri [/Users/yukito/dev/scraping]
ERROR: While executing gem... (Errno::EACCES)
Permission denied @rb_sysopen-/Users/yukito/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/.autotest

I apologize for the rudimentary question, but I appreciate your cooperation.

ruby-on-rails nokogiri

2022-09-29 22:04

2 Answers

Perhaps you ran $sudogem install xxx and lost access to /Users/Account Name/.rbenv?
I don't know if it's a solution or not at the following site, but there's a solution.
https://github.com/rbenv/rbenv/issues/930

$sudo town-R YOURUSER:staff/Users/me/.rbenv


2022-09-29 22:04

Try the following command:

$rbenv rehash

If it doesn't work, I think it would be easier for the respondents to answer if they put the results of the output in gemenv.


2022-09-29 22:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.