I recently tried updating the Rails 3.2.13 application to the recently released 4.0.0 and tried deploying it to Heroku. Unfortunately, despite the following this guide , assets still don't seem to be precompiling properly. Of course, I added gem rails_12factor , and I also did a few things to properly upgrade the application to 4.0.0. It works great in development mode, and all my tests still pass. However, it still does not display assets in Heroku.
One thing that I noticed when launching heroku run ls public/assets is that Heroku was really able to precompile the assets from app/assets , and the cat on these files will display the compiled version of the assets. However, if I access the file in the browser, I always get 404.
Is Heroku Really Ready for Rails 4?
EDIT
Here is a list of things I did to upgrade from 3.2.13 to 4:
Asset group removed because it is no longer used in Rails 4
Update rails version from 3.2.13 to 4.0.0
Remove the line active_resource/railties from the .rb application since active_resource was removed as a rails dependency
Update sass-rails and coffee-rails to use their respective leading branches because they use railties 4.0.0.rc2 instead of 4.0.0 as a dependency
Update devise version to 3.0.0.rc
Add protected_attributes to ease the transition to Rails 4 without having to switch to strong_parameters yet
Change your environment configuration to add config.eagerload and remove config.whiny_nils to remove the failure warnings.
Change the confirmation syntax () to remove the failure warnings.
Change hash syntax of hash missiles to syntax 1.9.3
Delete auto explanations configuration to remove failure warnings
Add bin directory with rake rails: update: bin
Add rails_12factor gem to be able to place the hero
Add ruby version to gemfile for heroku
EDIT 2
I think it’s also worth mentioning that during the preliminary compilation in Heroku there were no errors, and in fact he says that he was successful in precompiling the assets, so it’s strange that this did not work.
ruby-on-rails ruby-on-rails-4 heroku asset-pipeline
Terence ponce
source share