Reputation: 21621
This is my very first app that I'm running in RoR. This is the template app/views/home/index.html.erb. It contains this
<h1>Hello, World!</h1>
My controller is app/controllers/home_controllers.rb. But the class inside the file is Home
Home < ActionController::Base
def index
end
end
Finally, here is my routing file
Blog::Application.routes.draw do
root :to => 'Home#index'
end
When I am running this application, I'm getting the following error: "Routing Error: No route matches [GET] "/""
What's wrong with my application?
After applying all the corrections, this is how it looks.
HomeController < ActionController:: Base
def index
end
end
And the routing is now
Blog::Application.routes.draw do
root :to => 'Home#index'
end
I've also restarted the server, but I'm still getting the same error.
Thanks for helping
Upvotes: 0
Views: 66
Reputation: 24713
Get rid of the pluralization, home_controllers
should be home_controller
. In addition name your class HomeController
instead of Home
.
Upvotes: 1