I hope someone here can help me with this issue. I am creating a static webpage on my dev environment, so my routing file has one line in it:
TeaserSite::Application.routes.draw do
root :to => 'pages#home'
end
On my dev environment, this single page shows up correctly. When I pushed this code to heroku, I get a 404 error at that page. Log output for heroku when I visit the root url:
2011-02-20T23:07:36-08:00 app[web.1]: Started GET "/" for 76.28.89.32 at Sun Feb 20 23:07:36 -0800 2011
2011-02-20T23:07:36-08:00 app[web.1]:
2011-02-20T23:07:36-08:00 app[web.1]:
2011-02-20T23:07:36-08:00 app[web.1]: ActionController::RoutingError (uninitialized constant PagesController):
Rails server output on my dev environment:
Started GET "/" for 127.0.0.1 at 2011-02-21 02:16:58 -0500
Processing by PagesController#home as HTML
Rendered pages/home.html.erb within layouts/application (13.3ms)
Completed 200 OK in 85ms (Views: 83.6ms | ActiveRecord: 0.0ms)
I checked the following StackOverflow questions for some precedence with this but nothing has helped. I don't have the right-aws gem, changing config.serve_static_assets to true did not help, and I used the "git add ." command before pushing to heroku. Anybody know what the problem could be? For starters, is there any way I can confirm that the PagesController file was actually pushed to Heroku (aside from that calling git push heroku returns "everything up to date")?
Rails - Failing Routes in deployment Rails production static files routing error Heroku: Deploying rails application troubles
Do you actually have a controller called PagesController
. Did you make sure it is spelled correctly as the filename and in the header.
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