"You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory" (original) (raw)
Hi @mislav , I have a similar issue as This one.
I just noticed that you closed that issue so I open a new issue.
$ gem install bundler
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
I have added
eval "$(rbenv init -)"
to .bash_profile, and if I run
$ echo PATH∣tr′:′PATH | tr ':' PATH∣tr′:′'\n'
I got
/Users/username/.rbenv/shims
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
So you can see I have rbenv/shims at the highest. But when I run
which -a ruby
I got
/usr/bin/ruby
and with
which -a gem
I got
/usr/bin/gem
I don't know why they are still running. What I can tell is that under my .rbenv/versions or .rbenv/shims there is nothing there although I have run
brew install rbenv
I have also tried
rbenv local
rbenv global
which is suggested by other people. But the error remains. Do you have any idea on solving this?
Thank you in advance!