You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been with this problem for a few weeks and I'm not sure how to sort it out.
I've got a Rails 3.1.0.rc4 application in Heroku running and I'm (trying) to serve my assets with S3.
The thing is: The way things are now, I can't disable the asset compilation in production. I understand that in order to calculate the MD5 of the assets (and so call the proper asset in my S3 bucket) they must be compiled when starting the environment, but:
If I understand well, the assets are compiled when called from the view helper (sylesheet_link_tag or javascript_include_tag). That creates an unnecessary delay to the user that (in my case) frequently leads to a timeout (due to the 30s per request limit in Heroku).
There is no way to disable the MD5 calculation so I can freely reference application.css and therefore not having to compile it in production every time.
This problem is particularly painful when compiling javascript since I need a javascript runtime in production (therubyracer).
As far as I know, there are only two solutions to the problem:
Calculating the MD5 of the source files (scss, js) rather than the compiled ones. The compiled files are changed when the source files are, so that would be sufficient.
Add a configuration option to disable the MD5 calculation somewhat.
Is there anyone with the same problem? Any thoughts?
Thanks!
The text was updated successfully, but these errors were encountered:
I believe the intention with running Rails 3.1 on Heroku is to run rake assets:precompile as part of the slug compilation, however I'm not sure how that affects assets stored on S3. I know that Terence Lee (@hone) at Heroku is working on Rails 3.1 compatibility - perhaps he can help.
The thing is that I don't think that would solve the problem. Assets are still needed to be compiled in memory so the helper can deduct wich MD5 to use. And will be needed when another process spawns, with it's subsequent extra memory and CPU consumption.
Am I wrong? Didn't I understand how the asset pipeline works?
I will try to discuss it with @hone though, thanks :)
If the assets are precompiled, is this still an issue for you? Someone from rails can correct me here, but the md5 calculations should be fast if the file exists.
Hi,
I've been with this problem for a few weeks and I'm not sure how to sort it out.
I've got a Rails 3.1.0.rc4 application in Heroku running and I'm (trying) to serve my assets with S3.
The thing is: The way things are now, I can't disable the asset compilation in production. I understand that in order to calculate the MD5 of the assets (and so call the proper asset in my S3 bucket) they must be compiled when starting the environment, but:
This problem is particularly painful when compiling javascript since I need a javascript runtime in production (therubyracer).
As far as I know, there are only two solutions to the problem:
Is there anyone with the same problem? Any thoughts?
Thanks!
The text was updated successfully, but these errors were encountered: