Antonio Pavicevac-Ortiz
Antonio Pavicevac-Ortiz

Reputation: 7739

ERROR: While executing gem

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!

Upvotes: 0

Views: 2851

Answers (2)

New Alexandria
New Alexandria

Reputation: 7324

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.

Upvotes: 1

c0d3junk13
c0d3junk13

Reputation: 1162

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

 gem install jekyll --user-install

Upvotes: 0

Related Questions