The program 'sass' is currently not installed. You can install it by typing:Don't do as it says and install libhaml-ruby1.8, as you end up with an old version of Haml/Sass: 2.2.17. Instead, you first need to install Ruby and RubyGems, which is simple:
sudo apt-get install libhaml-ruby1.8
sudo apt-get install rubygemsNext, we install Sass using RubyGems (thanks for tip from Boyd Hemphill):
sudo gem install sassYou should now have Sass installed, but if you try to use it, you may still get the original "not installed" message. This is because annoyingly the RubyGems binaries directory is not automatically added to your PATH. To do this, I simply added the following to the end of my ~/.bashrc file:
export PATH=$PATH:/var/lib/gems/1.8/binThen restart your terminal and that should be it. You can check that it installed successfully, and that you have the latest version with the following command:
sass -vI get the following output: Sass 3.1.15 (Brainy Betty). You can then follow the rest of the tutorial on their website to start compiling .sass files into .css files.
Additionally, see this blog post for a great walk-through in refactoring existing CSS to Sass.
The export path part saved my life, many thanks!
ReplyDeleteYou don't need "haml" for "sass" any longer:
ReplyDeleteprompt > gem install sass -v 3.1.12
Many thanks! I didn't have /var/lib/gems/1.8/bin in my path, and the sass / compass websites just said it would work. What they meant was "it just works" on a mac. Yes, well, someone should tell them that "/usr/bin/sass" is a lot different than "/var/lib/gems/1.8/bin".
ReplyDeleteYou saved me! Thanks!
Thanks for the post. I think the latest version is Sass 3.4.7 (Selective Steve) so you might want to update this post (I know it is old, but it still seems to be the best way to install sass).
ReplyDelete