Reputation: 409
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
Upvotes: 1
Views: 1770
Reputation: 3005
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.
Upvotes: 4