First of all, according to this answer, the :cache => true
option on stylesheet_link_tag
and javascript_include_tag
doesn't work on Heroku. Is this true? I've found :cache => true
to work occasionally, but not always (weird!)
Also, what's the best solution here? Ideally it would seamlessly combine and minify all CSS / JS. Heroku Asset Packager claims to do this -- are there better options?
I'm using Jammit on Heroku. Works Great. You can locally build your assets and check in to heroku. use
jammit --force
the current version 0.5.1 has issues working on heroku but you can install the fixed version from git://github.com/documentcloud/jammit.git
If you are using Rails 3, specify the below in your bundler Gemfile:
gem "jammit", :git => "git://github.com/documentcloud/jammit.git"
For Rails 2.*
config.gem "jammit", :source => "git://github.com/documentcloud/jammit.git"
Good Luck.