Running Jammit on Ubuntu Natty 11.04
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:
which tells me to run this:
Now Java is installed on your instance and Jammit will compress your assets correctly!