1

I'm just starting out with rails and have been deploying my mini app to heroku as practice. Everything seems to be working fine, except for the home page. No matter what I've done, I still see the "Welcome aboard, you're riding Ruby on Rails" page. I've deleted public/index.html, and included the following line in routes.rb:

root to: 'static_pages#home'

This works fine on my own machine, but refuses to work when I deploy to Heroku. Any idea what would be happening?

Edit: Here's the rest of my routes.rb, not sure if it will help:

SampleApp::Application.routes.draw do
  resources :users
  resources :sessions, only: [:new, :create, :destroy]
  resources :comments

  match '/signup',   to: 'users#new'
  match '/signin',   to: 'sessions#new'
  match '/signout',  to: 'sessions#destroy', via: :delete

  root to: 'static_pages#home'

  match '/about',   to: 'static_pages#about'
  match '/contact', to: 'static_pages#contact' 
end
3
  • Index.php?? I'm not sure that's right.. Jan 6, 2013 at 1:38
  • Wow, sorry. Programming in PHP the rest of the day. I removed index.html. Jan 6, 2013 at 1:44
  • If you've deleted and are sure you have. And restarted the app. (I'm not sure how to do this on heroku.) Are you sure you're not caching it. Post the rest if your routes pls. :) Jan 6, 2013 at 1:51

1 Answer 1

4

Remove the public/index.html file by doing

git rm public/index.html
git add (any other files you want to the commit) #optional
git commit -m "removing public index"
git push heroku master

Since, heroku does a git based deployment - removing from just local will not help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.