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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Richard Nash](https://uploads.teamtreehouse.com/production/profile-photos/61099/micro_RYKR_Press_Photo_2_-_Square.jpg)
Richard Nash
24,862 PointsRuby update installation issue and question...
I'm trying to update ruby on my mac just like Guil Hernandez suggests in the video and I get the following error:
Last login: Thu Oct 16 23:19:19 on console
rn-3:~ richardnash$ gem update --system
Updating rubygems-update
Fetching: rubygems-update-2.4.2.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
rn-3:~ richardnash$
Gil suggests to use sudo to become a super user temporarily, which works, or course, but I would prefer to simply have total control over my computer all the time so I do not have to deal with using sudo ever again.
So how do I become the master of my own computer?
2 Answers
![Ryan Duchene](https://secure.gravatar.com/avatar/f8750f7abed0fb6faa200c2eaeb06e31?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ryan Duchene
Courses Plus Student 46,022 PointsRuby and a set of default gems come bundled with all Macs. They are installed for all users, so it's hard for anyone but root to change them.
You'll need to install rvm, and then use rvm to install a version of Ruby. rvm will allow you to have multiple versions of Ruby installed at once (and switch between them at ease). It will also allow you to maintain dependency sets for each project of yours with gemsets.
So, once you install rvm, run rvm install ruby-head
, and then gem install compass
, and you should be good to go.
If you run into sudo
issues with Homebrew, just use sudo
. Homebrew only requires it for installation IIRC, not for continued use.
![James Barnett](https://secure.gravatar.com/avatar/43ea08b4fc547e8a5da87c207bea2123?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
James Barnett
39,199 Pointsbut I would prefer to simply have total control over my computer all the time so I do not have to deal with using sudo ever again.
I like how this server fault answer puts it:
Most everyday tasks don't require a root shell. So it is good practice to use an unprivileged shell as your default behaviour and then only elevate to root when you need to perform special tasks.
By doing so you are reducing scope for dangerous mistakes (bad scripting, misplaced wildcards, etc) and vulnerabilities from any applications that you use.
For more details check out the Treehouse video on sudo in the Console Foundations course.