Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Installing and Updating Sass4:13 with Guil Hernandez
The quickest way to start using Sass is with the command line. In this video, we'll cover a few commands for installing—and updating—Sass on your computer.
- Installing Sass
- Related forum posts
- The Friendliest Guide About Installing and using Sass on Windows
Install Sass on Windows
From the sass-lang.com instructions:
Before you start using Sass you will need to install Ruby. The fastest way to get Ruby on your Windows computer is to use Ruby Installer. It's a single-click installer that will get everything set up for you super fast.
The installer will also install a Ruby command line powershell application that will let you use the Ruby libraries.
Installing the Sass pre-release
Use the command:
gem install sass --pre
gem uninstall sass
gem install sass
You can also specify the version. Ex:
gem install sass -v 3.4.13
gem update sass
Before we install Sass, 0:00 let's go over a few misconceptions we might have about using Sass. 0:01 So, the first one might be, there's no point in attempting Sass 0:05 unless you've had experience with the console, Git and Ruby. 0:09 Or we may think that to use Sass, 0:13 we'll need to know a ton of commands to make everything work. 0:15 And Sass steers too far from CSS, we have to learn a new language. 0:18 Well first, if you think you'll need to know Ruby to install and use Sass, 0:23 don't worry because you don't. 0:26 Hey, I'm not even close to being a Rubyist. 0:28 And we'll just need to know a few friendly commands to get up and running. 0:30 It won't be scary, I promise, and 0:34 finally, since Sass is a subset of CSS, it's not a new language. 0:36 We don't even need to use Sass syntax if we don't want to. 0:40 Writing plain CSS is actually writing valid Sass. 0:43 Yes, it is an extra layer of obstruction we're adding to our workflow, but 0:47 it's a powerful layer that, like I said, makes writing CSS more efficient, cleaner, 0:50 maintainable, and most of all, fun. 0:55 Sass lives and works locally on our machine, so 0:58 we really can't do anything just yet until we have Sass installed on our computers. 1:02 Since Sass is a Ruby gem, 1:06 we'll need to have Ruby installed on our machine in order to install Sass. 1:08 But, as I mentioned earlier, 1:13 don't worry because we don't need to know any Ruby to install and use Sass. 1:14 And if you're working on a Mac, chances are, you already have Ruby installed. 1:19 Now, it may sound a little nerve-racking, but 1:23 honestly, the quickest way to start using Sass is with the command line. 1:26 So, first things first, since I'm on a Mac, I'll need to bring up Terminal, and 1:30 that's where we'll write our commands. 1:34 So on the Mac, the Terminal app comes installed by default, and 1:36 it's located in our Utilities folder. 1:39 And don't worry if you're running Windows machine. 1:43 I've posted the windows installation instructions in the teacher's notes. 1:45 They're very similar. 1:48 Next, inside Terminal, or in your Command Prompt, we'll install Sass by 1:50 writing the command gem install sass, then hit Enter. 1:55 Now this command goes out and fetches the latest version of Sass and 2:02 installs it on our computer. 2:06 Now, if we get an error message after running this command, 2:09 it will likely be a permissions error. 2:12 For example, here we're getting an error that says, 2:14 you don't have write permissions for the Ruby/Gems directory. 2:17 Now if we see this error, 2:21 we'll need to use the command sudo gem install sass instead. 2:23 [SOUND] Sudo allows us to run the installation without the permission 2:29 problems. 2:33 It sort of puts us in a super user mode to get around permission issues. 2:34 Now it does ask us to enter our password to confirm the installation. 2:38 And this will usually be your user account login password. 2:43 And once we do that, it grants us the permissions to install and run Sass. 2:47 [SOUND] 2:51 [BLANK_AUDIO] 2:53 All right, so now let's make sure that we have Sass installed on our computer. 2:55 And we can do that by typing the command sass -v. 3:00 [SOUND] And once we hit Enter, if all goes well, 3:05 this returns the version of Sass we've installed. 3:08 In this case, it's Sass 3.4.13, Selective Steve. 3:11 Now your version might be different, 3:18 most likely a higher version compared to the version at the time of this recording. 3:20 And that's okay. 3:24 That just means you have the very latest version of Sass installed. 3:25 All right, so it looks like we're all set with our installation. 3:29 But what if we only need to update to the latest version of Sass? 3:33 Let's say you've already installed Sass in the past, and 3:37 now you just need to update it. 3:40 Well, to do that, we'll need to type the command, gem update sass. 3:42 [SOUND] And again, if you get any permissions errors doing this, 3:48 you'll need to run it under sudo. 3:53 So, with update command, we'll be all up to date. 3:55 Now, we just did a fresh install, so there's nothing to update at the moment. 3:58 Finally, if you wanna be on the bleeding edge and 4:03 start using the Sass features of tomorrow, today, take a look at how you can install 4:06 the pre-released version of Sass in the teacher's notes. 4:10
You need to sign up for Treehouse in order to download course files.Sign up