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 trialJustine Lam
8,785 PointsCan't install Sass
I'm getting the error:
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
2 Answers
Dino Paškvan
Courses Plus Student 44,108 PointsTry running sudo gem install sass
. You'll have to enter your password to confirm the installation as you'll be entering the superuser mode.
James Barnett
39,199 PointsIf you are new the to using the console I'd check out the first badge in console foundations to get familiar with moving around using the command line.
You also might be interested in using an app to Install Sass like Scout
Geoff Parsons
11,679 PointsGeoff Parsons
11,679 PointsAlternatively you may want to consider installing something like rvm or rbenv both of which will manage gemsets in your user directory instead of at a system level. I think installing rbenv is covered in this video.
Dino Paškvan
Courses Plus Student 44,108 PointsDino Paškvan
Courses Plus Student 44,108 PointsAnd using rvm or rbenv is a much better solution in the long run.
James Barnett
39,199 PointsJames Barnett
39,199 Points>
using rvm or rbenv is a much better solution in the long run.Better for whom?
I think
rvm
might be added complexity for designers using Sass who won't be writingany Ruby code.Dino Paškvan
Courses Plus Student 44,108 PointsDino Paškvan
Courses Plus Student 44,108 PointsThere are plenty of gems which have nothing to do with coding, they're just useful tools. Even when doing pure design work, sometimes you end up having to balance different versions of gems.
There are a lot of companies out there that fully expect frontend devs to be capable of running complex tools in the command line. Using rvm is hardly more complicated than using grunt or gulp which have become de facto industry standards. The frontend development is becoming more and more complex, and sadly, anyone who truly wants to master it will have to master tools such as these.
Justine Lam
8,785 PointsJustine Lam
8,785 PointsDino Paškvan what are the issues with using sudo? I was able to do that, but I was reading in StackOverflow that I shoudn't be doing that since it'll override my system's Ruby installation. I'll try to figure out rvm or rbenv, but I wanted to more fully understand what might happen now that I've installed Sass using sudo.
Dino Paškvan
Courses Plus Student 44,108 PointsDino Paškvan
Courses Plus Student 44,108 PointsUsing
sudo
in this case does nothing to your system's Ruby installation. You're just installing a gem and since thegem
command doesn't have write access rights for the folder where gems are installed, you're allowing it to do so withsudo
.As long as the only thing you've done was installing a gem, you'll be fine.
If you choose to set up rvm or rbenv, you won't have to mess with
sudo
anymore, and you'll be able to have multiple versions of Ruby installed.