Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Installing a Ruby Development Environment Installing a Ruby Development Environment Installing Ruby on Mac

Mikeal Abramoff
Mikeal Abramoff
10,224 Points

Error when trying to install gem

When following along with the treehouse video, I get the following error.

$ gem install bundler ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.

Any help on how to proceed would be helpful. Thanks

Are you using sudo before your gem command? This would allow you to install as admin and avoid the permissions issues.

Yes if you have chosen to work with Ruby / gems on a system level then use sudo. But recommended way is to install Ruby via rvm as an user and work with user privileges.

3 Answers

David Curtis
David Curtis
11,301 Points

which gem is it? thanks

crap, should have commented.

Christopher Quinn
Christopher Quinn
9,943 Points

Hey there Mikeal, what really helped me was installing the Ruby Version Manager

Update your package manager : sudo apt-get update Make sure curl is installed : sudo apt-get install curl Install RVM : \curl -sSL https://get.rvm.io | bash -s stable --ruby

This should get everything you need installed