I needed to install LESS (the CSS3 preprocessor) onto a machine that has almost nothing, so here are the steps I took to get it done.
YMMV, but this worked OK.
Ruby's got to be installed, so I ran RailsReady to get it all set:
wget --no-check-certificate
https://raw.github.com/joshfng/railsready/master/railsready.sh && bash railsready.sh
(Note that this script can take a really long time)
CAVEAT: You can't run this as root - it's got to be done as a normal user with SU privileges

so, using visudo, modify the sudoers file to include (your user name). Best way: look towards the bottom and find the root entry - just add you to look exactly the same. You might want to consider removing that line after you're done.

When done, do exec $SHELL.
Even as a SU, you'll still not have rights to the correct places, so for a moment open up a couple directories:
/usr/local/lib/ruby/gems/1.9.1 (or whatever the version when you're reading this) - use chmod -R 777 ./1.9.1. Later we'll chmod -R 775 it back.
Same with /usr/local/bin.
Gem will now run. To install lessc you'll need rubyracer, so
gem install rubyracer
Now install LESS:
gem install less
At this point clean up your work: 775 the gems dir and usr/local/bin. Again, you probably want to take yourself out of sudoers.
And you're ready! To compile a less script simply do this:
lessc inputscript.less > outputscript.css
My next step is to use Ruby to watch my directories and auto-compile scripts for me. As you can tell I'm not a fan of client side LESS compilation, but I also hate having to remember to recompile before I pull down a page modification. I'm using the steps I found here:
http://www.ravelrumba.com/blog/watch-compile-less-command-line/Just in case he's gone someday, here's the content:
Unlike SASS and Stylus, the command line compiler that comes with LESS does not include a watch option to automatically compile LESS files whenever changes are made. There are several GUI apps that provide watch functionality but if GUIs aren’t your thing or if you need something that can run on a server, you’ll want a way to do this from the command line. Here’s an easy way.
Install watchr, which is a Ruby tool for monitoring directories and files. With watchr and LESS installed you can watch-compile directories and sub-directories with a single command:
watchr -e 'watch(".*\.less$") { |f| system("lessc #{f[0]} > #{f[0]}.css") }'
To make this a little more useful we can call it with a bash script. We’ll also print a status update on each compile. Successful compiles will print the compiled file name and any compile errors will be displayed in the console.
#!/bin/bash
# Requires watchr:
https://github.com/mynyml/watchrwatchr -e 'watch(".*\.less$") { |f| system("lessc #{f[0]} > #{f[0]}.css && echo \"#{f[0]} > #{f[0]}.css\" ") }'
Name it something like watch_less.sh, put it in /usr/local/bin/ (or wherever you keep your executables), set permissions with chmod u+x watch_less.sh, and then just run watch_less.sh from your workspace.
Bonus
Here’s another option that uses inotify-tools (note: Linux-only) instead of watchr. This was suggested by @yoavweiss when I asked on Twitter if anyone had a recommended solution for watch-and-compiling LESS from the command line:
while true;do N=`find -name "*.less" `;inotifywait -qe modify $N ;for f in $N;do lessc $f ${f%.*}.css;done;done
The best response in the thread is a guy that says this:
elgreg February 6, 2012
You blog post couldn’t have been more perfectly timed. I just started a new project and heard about watchr at the Twitter Bootstrap 2.0 announcement. I’m on OS X and decided to use growlnotify instead of echo and run watch_less.sh with & to not have a constantly running window.
> watch_less.sh &
runs
#!/bin/bash
# Requires watchr:
https://github.com/mynyml/watchrwatchr -e ‘watch(“.*\.less$”) { |f| system(“lessc #{f[0]} > #{f[0]}.css && growlnotify \”compiled\” -m \”#{f[0]} > #{f[0]}.css\”") }’
(installed growlnotify with homebrew >brew install growlnotify)
I'll see how it works and post back. Enjoy. Sort of.