Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to: Sass on cPanel

Discussion in 'Workarounds and Optimization' started by turbo2ltr, Feb 10, 2017.

  1. turbo2ltr

    turbo2ltr Member

    Joined:
    Jun 3, 2011
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    51
    While I found people asking, there wasn't any definitive answer to this on the web. I figured I'd post my experience. Prior to attempting this I knew very little about Ruby and nothing about Sass so YMMV.

    Platform was a dedicated server running CENTOS 6.8 x86_64 and WHM 62.0.11

    The basics are:
    • Install Ruby
    • Install RubyGems
    • Install Compass
    I followed these helpful instructions about installing Ruby on Rails.

    I followed only the first two steps: [RUBY INSTALL], and [GEM INSTALL]. There is no need for Rails, Passenger, Node.JS or anything else in that tutorial. The instructions worked without an issue and everything compiled cleanly.

    Make sure you go to the sites linked under each codeblock to get the URL of the latest Ruby/Gem version to use in the wget. At the time if this post, I installed versions:
    • Ruby 2.4.0
    • Rubygems 2.6.10

    Next I installed compass-style.org

    Code:
    gem install compass
    There is an install page compass-style.org/install but that single line is all you really need.

    Once that is complete you are ready to use Compass.

    For my particular situation, I had purchased a Magento template that used Sass, so I didn't need to create a new project. There was already a config.rb file in the template. I navigated to the sass folder (which had the config.rb) and typed

    Code:
    compass watch
    It now watches your scss files for changes and automatically compiles the css files.

    See the Compass docs compass-style.org/help for more info on how to use it.

    I am by no means an expert so hopefully I didn't do anything stupid but hope this helps.
     
    #1 turbo2ltr, Feb 10, 2017
    Last edited by a moderator: Feb 10, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. turbo2ltr

    turbo2ltr Member

    Joined:
    Jun 3, 2011
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    51
    Sorry if I wasn't supposed to link to external sites. Just trying to make it helpful.
     
Loading...

Share This Page