Gem install bundler pry bye bug - You don''t have write permissions


I have search and found a few topics regarding this but most answers are “Ok I fixed it” or “was a path issue”

Unfortunately these dont help me much.

When I run the “gem install bundler pry byebug” command I get the following error:

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

I am running Catalina 10.15.5 and ran the ‘zsh’ commands that were suggested. At a bit of a loss here and need to get this fixed so I can begin my learning.

Any help appreciated… Thanks.

Hi, @glider! Welcome to the community! :wave:

What happens when you type sudo gem install bundler pry bye bug and enter in your computer’s password if it asks for it?

Hello Bryan,

It installed the gems so thanks. I was under the impression we should avoid running this under sudo though.

Yes, this is very true.

If you wanted to get a correct setup, you would most likely need to look at installing homebrew, rbenv and ruby via rbenv … this is typically the “ideal” setup for development. :+1: