Last Updated: February 25, 2016
·
2.715K
· nodondevivo

Install Less CSS compiler in Ubuntu via rubygems

Installing Less CSS compiler in Ubuntu (12.04) is as simple as typing in a Terminal
sudo apt-get install rubygems1.8 ruby1.8-dev sudo gem install rubygems-update sudo gem update rubygems sudo gem install less</code>

And then symlinking the executable binary with
sudo ln -s /var/lib/gems/1.8/bin/lessc /usr/bin/</code>

ps. To compile, just navigate to the folder and typing
lessc layout.less > layout.css</code> will compile your .css

2 Responses
Add your response

Thanks a lot for adding your tutorial on running less into Ubuntu.
Its really hard to look for implementing simple things on Ubuntu.

I have tried this in Ubuntu 12.10 everything works fine but the symbolic link shows error and while running lessc it errors out to install "therubyracer".

Any ideas?

Thanks a lot.

over 1 year ago ·

Please try the method explained in my other ProTip (https://coderwall.com/p/t9jrwg?i=1&p=1&q=author%3Anodondevivo&t[]=nodondevivo), which consists in installing the lessc compiler thru Chris Lea's ppa.

over 1 year ago ·