Install Ruby, Sass and Compass

Sass is a CSS preprocessor which adds nested rules, mixins, variables, selectors and more. Sass generates well formatted CSS and makes your stylesheets easier to organize and maintain. Compass is a framework build on the top of the Sass and it makes working with Sass even easier. Both Compass and Sass are Ruby gems so you’ll need to have Ruby on your linux vps


RVM (Ruby Version Manager) can handle the installation and management of multiple Ruby environments.

Install dependencies

Debian based distributions ( Debian VPS  / Ubuntu VPS )

apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config

Red Hat based distributions ( Centos VPS / Fedora VPS / Scientific Linux VPS )

yum install gcc-c++ patch readline readline-devel curl zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel

Arch Linux ( Arch-Linux VPS )

pacman -Sy --noconfirm gcc patch curl zlib readline libxml2 libxslt git autoconf automake diffutils make libtool bison subversion

Install RVM

curl -L | bash -s stable --ruby

Add the following code to ‘/etc/profile’, log out and then log back in.

if [ -s "/usr/local/rvm/scripts/rvm" ] ; then
 . "/usr/local/rvm/scripts/rvm"

Install Ruby 1.9.3

rvm install 1.9.3
rvm use 1.9.3
rvm rubygems latest

Run ruby –version to verify.

#-> ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

Install Compass

gem update --system
gem install compass

You will get output similar to the following

#-> gem install compass
 Fetching: sass-3.2.1.gem (100%)
 Fetching: chunky_png-1.2.6.gem (100%)
 Fetching: fssm-0.2.9.gem (100%)
 Fetching: compass-0.12.2.gem (100%)
 Successfully installed sass-3.2.1
 Successfully installed chunky_png-1.2.6
 Successfully installed fssm-0.2.9
 Successfully installed compass-0.12.2
 4 gems installed
 Installing ri documentation for sass-3.2.1...
 Installing ri documentation for chunky_png-1.2.6...
 Installing ri documentation for fssm-0.2.9...
 Installing ri documentation for compass-0.12.2...
 Installing RDoc documentation for sass-3.2.1...
 Installing RDoc documentation for chunky_png-1.2.6...
 Installing RDoc documentation for fssm-0.2.9...
 Installing RDoc documentation for compass-0.12.2...

Create your first project

cd /path/to/projects_directory
compass create my_project

What should you read next?


Install eZ Publish Community Project on a CentOS 7 VPS with Nginx and PHP-FPM
How to install LAMP (Linux, Apache, MySQL & PHP) and phpMyAdmin on a Debian 8 VPS
Install Zulip on Ubuntu
  • Jeroen


    Author Reply

    Where do i have to put:

    if [ -s “/usr/local/rvm/scripts/rvm” ] ; then
    . “/usr/local/rvm/scripts/rvm”


    At the end of the file?

    • admin


      Author Reply

      Yes, add the lines at the end of the file.