質問

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