Rails assets precompile problems on heroku

It just broke, but heroku team is investigating it, so lets hope we’ll know what caused it soon. But there is some workaround, but your deployment process will become less convenient.

First precompile assets locally, by runnung

rake assets:precompile

I noticed that assets precompilation is allways in production env. You may assure that by running RAKE_ENV=production.

But that makes some problems on your local machine, since your app loads now both dynamic AND precompiled assets. You may notice that, when you have two ajax requests on one click running. What you need to do is adding this option to your environments/develomplent.rb:

  config.serve_static_assets = false

But be carefull if you use Thin server – it seems to ignore that one.

And please remember clear out web browser cache. And you should be good to go.

But you need to precompile assets manually and commit changes to repo before each deployment. That sucks, but the alternative is you siting there and waiting for miracle, and your work is not going forward. Which one sucks more for you?

Im prościej, tym lepiej

photo: photography-andreas


Właśnie skończyłem zmagać się z super hi-fi, świetnym i wypasionym hostingien heroku (który działa na jeszcze lepszym i wypasionym EC2 amazona), ale jak przyszło co do czego to maila i tak trzeba było wysłać ze starego, poczciwego hostingu vipserv.

Gmail się obraził i chciał, żeby aplikacja rozwiązywała captche, a SendGrid się weryfikuje ręcznie. Jednak reset hasła nie może tak po prostu nie działać. Dobrze, że jest na kogo liczyć w dzisiejszych czasach.

ps. jeśli nie zarejestrowaliście się do tej pory na http://naveg.as/ to musicie się teraz uzbroić nieco w cierpliwość – od teraz będzie dostępba tylko poprzez zaproszenia. Nadchodzi czas intensywnych beta testów :P