Reputation: 35
I'm new in Ruby On Rails. I installed in 2 days ago on windows and now I want to create a simple "Hello Rails" with it. I use This Tutorial. I did all the steps described in this it does'nt work. the steps are:
delete the default page from application with this command rm public/index.html
Open the file config/routes.rb in editor, and edit root
:to => "welcome#index"
to
:to => "home#index"
"http://localhost:3000"
in my browser but I see this error instead Hello Rails: (I don't have enough reputation to post image of error)
Routing Error
No route matches [GET] "/"
Can anybody tell me whats the problem? Thanks
Upvotes: 2
Views: 179
Reputation: 7403
Make sure the only content in your config/routes.rb
file is the following:
Blog::Application.routes.draw do
root :to => "home#index"
end
(just delete everything else for now to make sure it's clean)
Also, try killing the server and making sure that you don't still see that error message (which could indicate that another server is still running somewhere). Along these lines, make sure you see the request in your console output when you fetch the page.
If you're still getting the error, look for any clues in the console error messages.
Upvotes: 2