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

Development Tools

J K
PLUS
J K
Courses Plus Student 10,046 Points

Error using the command line

I have the latest version of Ruby already installed on my Mac. I've tried installing Ruby on Rails and I get this error message. ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

I also have tried installing Sass and I get the same thing. I'm new at using the command line, so I'm sure it's something simple that I'm doing wrong in both cases.

3 Answers

Crisoforo Gaspar Hernández
Crisoforo Gaspar Hernández
18,302 Points

May be it's a issue with the user you're logged in. You should try with the user sudo:

```$ sudo gem …

Nick Fuller
Nick Fuller
9,027 Points

Crisoforo is right. However, I would suggest you install a version manager like rvm or rbenv. These do not require you to provide administrative privileges when running commands.

J K
PLUS
J K
Courses Plus Student 10,046 Points

Great, I'll try your suggestions. Thank you both.