I just updated my app to Rails 4.0.0.beta1 and Ruby 2.0.0. It's a fairly simple app and the update went smoothly in development but when I deployed to Heroku I am getting a routing error on the precompiled assets.
ActionController::RoutingError (No route matches [GET] "/assets/application-ec10cb548646d3f1c9963e6071fd834f.css"):
and
ActionController::RoutingError (No route matches [GET] "/assets/application-f6ecf7845034937996ac1e966af347b9.js"):
Can anyone point me in the right direction?
If you followed this guide (Getting Started with Rails 4.x on Heroku) before yesterday afternoon (2013-03-27), then you likely need to change your Gemfile from:
group :heroku do
gem 'rails_log_stdout', github: 'heroku/rails_log_stdout'
gem 'rails3_serve_static_assets', github: 'heroku/rails3_serve_static_assets'
end
to simply:
gem 'rails_log_stdout', github: 'heroku/rails_log_stdout'
gem 'rails3_serve_static_assets', github: 'heroku/rails3_serve_static_assets'
Optionally, switch :heroku
for :production
.
I believe this solution has been updated, and Heroku has replaced rails_log_stdout
and rails3_serve_static_assets
with rails_12factor
. See here.
Now, you should put this in your GemFile:
gem 'rails_12factor', group: :production
Then run bundle install
and git push heroku
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With