0

I'm getting the typical error on Heroku, that it appears the solution is to precompile locally and then commit to git.

ActionView::Template::Error (application.css isn't precompiled)

However I have my assets on Rackspace CloudFiles CDN using asset_sync and they are compiled fine, so I don't really want to also have to commit the compiled assets to git.

Any solution?

Colin
  • 784
  • 2
  • 8
  • 21

1 Answers1

1

before you push your app to heroku run the following.

bundle exec rake assets:precompile

That will precompile all the necessary javascript and css.

If you are running the app on your computer after you precompile you will not see any css and js changes until you run.

bundle exec rake assets:clean

that will remove all precompiled files, you need to precompile every time you push your app.

nzajt
  • 41
  • 5
  • Do you mean I have to precompile and commit to git? As otherwise they won't end up on heroku anyway... But I shouldn't need them there as they're on the CDN. – Colin Apr 27 '12 at 09:47