Title: Ruby Permission Error
Tags: ruby-on-rails;ruby;shell
Question: When trying to do gem install bundle I get this:
ERROR:  While executing gem ... (Gem75b5:f2c1:f5d7:b954:8dc3:cee9:baf:a8c0ilePermissionError)
You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.
How do I fix this?
Comment: You should **really** consider researching [RVM](https://rvm.io/) or [rbenv](https://github.com/sstephenson/rbenv) for managing your rubies and gems.


Here is another answer: root access with sudo
sudo gem install bundle
Comment for this answer: Using `sudo` to install a gem on Mac OS isn't recommended. Apple installs Ruby for their own use, not ours. It's better to use RVM or rbenv to install a Ruby in a sandbox, and leave Apple's Ruby alone.
Comment for this answer: Thanks. When I did that, I got this:
ERROR:  While generating documentation for bundle-0.0.1
... MESSAGE:   exit
... RDOC args: --ri --op /Library/Ruby/Gems/1.8/doc/bundle-0.0.1/ri lib --title bundle-0.0.1 Documentation --quiet

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2012:00:12/14/12', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<ruby-on-rails><ruby><shell>', 'Title': 'Ruby Permission Error', 'ViewCount': 356, 'id': 13871662, 'user_AboutMe': '', 'user_AccountId': 1870748.0, 'user_DisplayName': 'jkhaykin', 'user_Reputation': 23.0, 'user_Views': 16.0, 'user_id': 1693023.0}}