I’m not sure if it had to do with having OS X Yosemite, but I kept running into an issue when trying to install gems on my machine.
While trying to run the regular $ gem install, I would receive this message:
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Meaning I couldn’t install any gems unless I ran $ sudo gem install each time i tried to install a gem.
So, somewhere on stackoverflow I found someone’s advice to install RVM (Ruby Version Manager). But I hated the installation instructions on that site. So I came across this blog post with step-by-step RVM installation instructions which ended up being really helpful: http://foffer.dk/install-ruby-on-os-x-10-10-yosemite-using-rvm/
And voila! You can now install gems without having to do the $ sudo command 😀 BUT WAIT. You should take a look at the next link.
This post is also really helpful and includes more tips for when you’re installing gems and especially Rails with RVM: http://railsapps.github.io/installrubyonrails-mac.html
And I think that’s it for now! Good luck and have fun!