Rolling Windows and Sticky Bytes

<tagline type="clever"/>

Ruby on Rails Asset Pre-compliation for Heroku

on 2012-05-25

A couple of weeks ago while I was working on a Ruby on Rails application, I ran into an issue with assets failing to pre-compile. Rake threw the following message:

rake aborted!
 application.scss isn't precompiled

After spending a day trying to figure out what was wrong with my code, I discovered it’s a bug in the version of Rails I was using. Upgrading to Rails 3.2.0 did the trick.

Just as a quick reminder to myself, the following command will clean (delete!) the pre-compiled assets:

RAILS_ENV=production bundle exec rake assets:clean

The following command will run the pre-compile:

RAILS_ENV=production bundle exec rake assets:precompile

Once the assets are compiled, add them to your git repository and run:

git push heroku

Leave a Reply

Your email address will not be published. Required fields are marked *