get install bundler failed (you't don't have write permission)

0

I am trying to install bundler on my Mac, and I have installed homebrew, and rbenv. My rbenv doctor script returns:

Checking for `rbenv' in PATH: /usr/local/bin/rbenv
Checking for rbenv shims in PATH: OK
Checking `rbenv install' support: /usr/local/bin/rbenv-install (ruby-build 20190423)
Counting installed Ruby versions: none
  There aren't any Ruby versions installed under `/Users/morgan/.rbenv/versions'.
  You can install Ruby versions like so: rbenv install 2.2.4
Checking RubyGems settings: OK
Auditing installed plugins: OK

But when I run gem install bundler I get the error:

 You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

My ~/.bash_profile looks like this:

eval "$(rbenv init -)"

What should I do to get bundler up and running?

Morgan Smith

Posted 2019-06-09T17:26:59.753

Reputation: 23

No answers