Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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