I've installed rbenv through homebrew as detailed in the README and then run gem install bundler only to be greeted with:
$ gem install bundler
Fetching: bundler-1.15.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory
I'm not sure what to do next to solve this problem.
Judging from that path (/Library/Ruby/Gems/2.0.0), you're using system ruby still.
Check rbenv doctor to see what's up: https://github.com/rbenv/rbenv-installer#rbenv-doctor
(Odds are, you didn't initialize rbenv in your .profile/.bashrc/etc or you didn't start a new shell.)
Thanks for getting back to me, I'm pretty sure you're right, I popped the necessary lines into my .bash_profile and things seem to be working ok. I get a little confused with .bashrc, .profile and .bash_profile files, but it works so I'll not question it further.
Same problem. The instructions just lead you to a permission failure :(
Sadly, rbenv doctor tells me I'm just fine... and I've restarted my terminal.
Using which ruby even shows me the user rbenv folder.
But I'm stuck with this error when trying to install bundler...
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
If I try to use the --user-install flag on the installer it warns that I don't have the following in my PATH... ~/.gem/ruby/2.0.0/bin WAT?
SOLVED
This is due to not setting the Ruby version _globally_ after installing a version. I installed it locally, but after restarting the terminal I went to another location to install the gem. For future travelers...
rbenv global X.X.X
Most helpful comment
SOLVED
This is due to not setting the Ruby version _globally_ after installing a version. I installed it locally, but after restarting the terminal I went to another location to install the gem. For future travelers...
rbenv global X.X.X