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 trialBruce McMinn
10,030 Pointswrite permission for ruby gems
Hi. I am trying to install the awesome_print gem.
When I do so I get
While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
I have enabled the root user in the directory utility under users in system prefs.
FWIW, I am using my family machine because my code machine is on the road with my spouse. I am a little hesitant to change too many things because I don't want to affect security or future updates from Apple.
That being said, this is pretty fun...
2 Answers
Kevin Kenger
32,834 PointsHey Bruce,
The reason it's not giving you permissions is that it's Apple's installation of Ruby for their own use. It's the system Ruby. It's totally fine to modify it as long as you know what you're doing, and if you were on your coding computer and you were running into this problem I would just suggest using
sudo gem install awesome_print
But if you don't want to mess with that and you're just playing around with stuff I would use rbenv or rvm to create and manage a separate Ruby.
Bruce McMinn
10,030 PointsThat's what I was thinking. I have used rvm on the other machine and it seems to work great. TMTOWTDI, huh.
If I do the sudo command is there a way to revoke that privilege?