How to: Sass on cPanel
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:
[LIST]
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:
[LIST]
Ruby 2.4.0
Rubygems 2.6.10
Next I installed compass-style.org
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
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.
gem install compassThere 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
compass watchIt 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.
-
Hello, Thanks for sharing! 0 -
Sorry if I wasn't supposed to link to external sites. Just trying to make it helpful. 0
Please sign in to leave a comment.
Comments
2 comments