Compass is an open-source CSS authoring framework that can compile .css stylesheet files from .sass files as they are written, thus making the life of a web designer easier. In this tutorial we will install Compass on RHEL 8 / CentOS 8, with all of it's dependencies.

In this tutorial you will learn:
  • How to install dependencies required by Compass
  • How to Compass
  • How to create a Compass project
Project creation with Compass.
Project creation with Compass.

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System RHEL 8 / CentOS 8
Software Compass 1.0.3
Rubygems 2.7.6
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

How to install compass on Redhat 8 step by step instructions

Installing Compass is an easy task, if we know what packages it needs, but sort of tricky if we are not familiar with ruby. All packages required are available if we have the subsription management repositories enabled.

Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.

  1. We'll use dnf to install required packages:
    # dnf install ruby ruby-devel rubygems gcc
  2. Next we use rubygems to install Compass:
    # gem install compass
  3. To see our tool working, we can query for the version of Compass:
    # compass --version
    Compass 1.0.3 (Polaris)
    Copyright (c) 2008-2019 Chris Eppstein
    Released under the MIT License.
    Compass is charityware.
    Please make a tax deductible donation for a worthy cause:
  4. The last step is to create an empty Compass project.
    $ compass create my_project
    directory my_project/ 
    directory my_project/sass/ 
    directory my_project/stylesheets/ 
       create my_project/config.rb 
       create my_project/sass/screen.scss
    As the output suggests, we can begin populating the project with SASS files in the appropriate subdirectory, my_project/sass/ in the above example. We can set Compass to compile as we edit the .sass files, or compile on demand, etc.
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
Get extra help by visiting our LINUX FORUM or simply use comments below.