Search code examples
rubyterminalrubygemsrake

I am trying to install rake using the command gem install rake on mac terminal, but I keep getting this error


$ gem install rake ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory. Stephens-MBP-2:lib stephengiardina$


Solution

  • it means you have no access rights on that directory. might be owned by root.
    try running the following command:

    sudo chmod a+rwx  /Library/Ruby/Gems/2.6.0