0

I have been trying to install jekyll and bundler, and I keep getting this error:

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

I have tried so many things suggested by other posts. Ran rbenv, appended eval "$(rbenv init -)" to my bash_profile in order to run it automatically, did some stuff with sudo, and also tried installing using:

gem install jekyll --user-install

but then when I try to make a jekyll command the return is:

-bash: jekyll: no command found

I am at a loss. I know basically nothing about Unix and have been trying this for hours. Any thoughts?

P.S. Please do not mark as duplicate because other posts have not answered my question.

1 Answer 1

0

It seems you haven't add the user gem bin dir to the PATH.

ruby -rubygems -e 'puts Gem.user_dir'

this will show the gem user dir.

then add OUTPUT_FROM_LAST_CMD/bin to your path, or simply add

export PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin":$PATH

to your ~/.bashrc


  1. http://guides.rubygems.org/faqs/#user-install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.