I updated my Mac OS to 10.9 Mavericks yesterday. My current Ruby version shows as
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
I got Rails installed on my machine and when I try to install gems I get the following message:
Fetching: eventmachine-1.0.3.gem (100%) ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
I am trying all this in my home directory. Any suggestions?
To install a gem, use gem install [gem] . Browsing installed gems is done with gem list . For more information about the gem command, see below or head to RubyGems' docs. There are other sources of libraries though.
Use a Ruby version manager, like RVM or rbenv.
I can't speak for rbenv, but RVM prepends a Ruby version-specific bin
to your PATH
that you have access to, so you don't have to use sudo
(which is how you could install gems in your current situation, but is highly discouraged).
rbenv similarly prepends to your $PATH
, but it uses a shim.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With