I attempted to install the twitter gem onto my Mac via the Terminal app. However, upon typing gem install twitter
, I get errors as shown in the image below:
Any solutions on how to eliminate this issue?
I attempted to install the twitter gem onto my Mac via the Terminal app. However, upon typing gem install twitter
, I get errors as shown in the image below:
Any solutions on how to eliminate this issue?
You have ecountering a write permissions error because the user account you're using doesn't have write permissions to the system library where your current Ruby is storing its gems.
You should never write to system directories when installing gems. Instead, use a Ruby version manager like rvm, rbenv, or chruby to manage your interpreters and install gems in user-writable directories.
There are numerous security and stability problems that you will inevitably encounter if you insist on abusing your system Ruby interpreter, especially on OS X. Don't do it.
Using sudo gem install twitter
does the trick :)