i am trying to install colorls on my mac terminal and when running the "gem install colours" 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 have tried some fixes online but nothing is working. Can anyone help?
Related
I tried to install a gem with gem install test-unit and get the same error each time.
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
When I tried to install pry on terminal, it keeps telling me
$ gem install pry
While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0
directory.
I've tried to update gem, using homebrew to install ruby. but still get the same error.
Common Practices when something says what you don't have permission to perform an action:
Try to execute the command with sudo prefix (sudo gem install pry).
Execute the command as root (Not recommended due to potential issues).
Im trying to get rubymine to work but i always keep getting this error "operation not permitted"
Gabriellas-MBP:~ GabriellaKampe$ gem install rails
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Gabriellas-MBP:~ GabriellaKampe$ sudo gem install rails
Password:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/sprockets
Gabriellas-MBP:~ GabriellaKampe$
You don't have permission to write to the gemfile directory of your the ruby version that comes bundled with your OS. What you'll have to do is manage your ruby versions using either rbenv or rvm. I will recommend rbenv and you can follow the guide on these links rbenv rails install Mac OS or rbenv rails install Ubuntu
This is the massage I am getting
IMTIAZs-MacBook-Pro:~ imtiazahmed$ gem install bundle ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. IMTIAZs-MacBook-Pro:~ imtiazahmed$
Please help me to solve this.
Thanks
Im on macos big sur 11.6 I had to export ruby to my path in the terminal
export PATH="/Users/okerajohnson/.gem/ruby/2.6.0/bin:$PATH"
and even after that regularly typing gem install gem_name still gave me permission error so I have to do
gem install gem_name --user-install
Installing gem or updating RubyGems fails with permissions error
I try and gem install cocoapods I get an error :
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
what does it mean???
You need to be root to write into /Library, so you need to use sudo, as the instructions tell you:
$ sudo gem install cocoapods