I like to use DocumentCloud’s Jammit for CSS/JS compression. I have been doing the compression locally and then unzipping the files on the server, but I recently wanted to change this and do the compression on the server – that way CSS/JS and Python could NEVER get out of sync (say if I was on branch X but deployed branch Y locally, the server would have a branch Y django backend but a branch X front-end). When I moved the compression to the server, I saw the following message (deploying using Fabric):

[xxx.xxx.xxx.xxx] out: Jammit Warning: Asset compression disabled -- Java unavailable.

Sure enough, the JS/CSS was not being compressed (not cool).

Here is the fix incase anyone is interested:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get -f install sun-java6-jdk

which tells me to run this:

sudo apt-get -f install
sudo apt-get install sun-java6-jdk

Now Java is installed on your instance and Jammit will compress your assets correctly!