문제

Found today I couldn't get my 'jekyll server' to start, so I preceded to reinstall 'jekyll' but I get this error...

ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

Then I tried 'sudo gem install jekyll' and it worked!

Can anyone explain what's going on? Thanks!

도움이 되었습니까?

해결책

Use rbenv to setup a ruby binary that is in your home dir (a writable path).

You get that error because you lack write permissions to the System dir. Don't try to get write perms there - that's just asking for trouble. Instead, install a ruby version manager.

rbenv is linked above. Some like RVM. You can google for the arguments that pro/con each. rbenv is "more unix-like" and that is a good reason on its own.

다른 팁

It is installing system wide , you can force a single user install as follow

 gem install jekyll --user-install
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top