Question

Here is a problem while changing the target of the :root of my rails 3.1 project :

I updated my config/routes.rb to point the root to a custom page.

root :to => 'pages#home'

Then, I removed the existing public/index.html. Everything is ok in local.

I ran git commit -am "message", the result was : delete mode 100644 public/index.html

I also committed my new routes.rb and the needed controllers and views.

I pushed to heroku : git push heroku master And then I ran heroku rake routes the result was :

pages_home GET /pages/home(.:format)       {:controller=>"pages", :action=>"home"}
pages_formations GET /pages/formations(.:format) {:controller=>"pages", :action=>"formations"}
pages_music GET /pages/music(.:format)      {:controller=>"pages", :action=>"music"}
        root     /                           {:controller=>"pages", :action=>"home"}
        home     /home(.:format)             {:controller=>"pages", :action=>"home"}
  formations     /formations(.:format)       {:controller=>"pages", :action=>"formations"}
       music     /music(.:format)            {:controller=>"pages", :action=>"music"}

But if I go to my application page, I have an empty white screen. If I reset the public/index.html, I have this one displayed.

So it seems like Heroku does not take my modifications into account. But the commit works : if I clone the project after deleting the file, I can see that it is deleted.

Was it helpful?

Solution

White page usually means you have some sort of error in production. The best way to handle this is to check your production log on heroku with:

heroku logs

And to address an actual problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top