Print

Print


On 3/29/2012 5:05 PM, Chris Fitzpatrick wrote:
> locally and push them rather than rely on Heroku to precompile them
> (currently when I push, Heroku's precompile fails, so it reverts to
> "compile at runtime" mode) ....if anyone has insight into this, please
> lemme know...I believe having them compile at runtime does slow down
> the application...

Have no idea why it's not working in heroku, no experience with heroku 
(although I'm familiar with the concept).

But compile at runtime _will_ slow down your app, yeah. Here's a 
stackoverflow I asked on it myself:

http://stackoverflow.com/questions/8821864/config-assets-compile-true-in-rails-production-why-not

Compiling locally and then pushing should work, and is arguably better 
in some ways (why waste cycles on the production machine compiling 
assets?)  But, if you choose to compile and check into your source 
control repo,  here's a trick that will keep it from driving you crazy 
in development using your on-disk compiled assets... eh, I can't find 
the blog post on google now, but it's something like changing 
config.assets.path = "/dev-assets" in environments/development.rb, so in 
development it will ignore your on disk compiled assets.