Installing CoffeeScript on Ubuntu

Unfortunately the current CoffeeScript package is for an old version. Thus, some manual work is needed to get the latest version working for you on Ubuntu. Here are the steps, we need to install Git, node.js, npm and finally CoffeeScript:

$ sudo apt-get update
# Install needed packages
$ sudo apt-get install git-core curl build-essential openssl libssl-dev
# Install node.js
$ git clone && cd node
$ ./configure
$ make
$ sudo make install
$ cd
# Install npm
$ curl | sudo sh
#Install CoffeeScript
$ sudo  npm install -g coffee-script

Now give it a shot:

$ coffee -i
coffee> square = (x) -> x * x
coffee> square 5