amrit pal pathak
2011-Apr-17 06:46 UTC
No route matches "/home/index" with {:method=>:get}
I followed a tutorial to learn ruby on rails at http://guides.rubyonrails.org/v2.3.8/getting_started.html After creating a view and controller as "script/generate controller home index" and then i changed the contents of app/view/home/ index.html.erb file according to tutorial into one line as <h1>Hello, Rails!</h1> Now i started the server as script/ server(successfully started) and when i navigate to localhost:3000/ home/index, i got a error message which says ROUTING ERROR No route matches "/home/index" with {:method=>:get} Please someone help to resolve. Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
amrit pal pathak
2011-Apr-17 06:46 UTC
No route matches "/home/index" with {:method=>:get}
I followed a tutorial to learn ruby on rails at http://guides.rubyonrails.org/v2.3.8/getting_started.html After creating a view and controller as "script/generate controller home index" and then i changed the contents of app/view/home/ index.html.erb file according to tutorial into one line as <h1>Hello, Rails!</h1> Now i started the server as script/ server(successfully started) and when i navigate to localhost:3000/ home/index, i got a error message which says ROUTING ERROR No route matches "/home/index" with {:method=>:get} Please someone help to resolve. Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I followed a tutorial to learn ruby on rails at http://guides.rubyonrails.org/v2.3.8/getting_started.html <http://guides.rubyonrails.org/v2.3.8/getting_started.html>After creating a view and controller as "script/generate controller home index" and then i changed the contents of app/view/home/index.html.erb file according to tutorial into one line as <h1>Hello, Rails!</h1> Now i started the server as script/server(successfully started) and when i navigate to localhost:3000/home/index, i got a error message which says ROUTING ERROR No route matches "/home/index" with {:method=>:get} Please someone help to resolve. Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, Apr 17, 2011 at 6:46 AM, amrit pal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I followed a tutorial to learn ruby on rails at > http://guides.rubyonrails.org/v2.3.8/getting_started.html > After creating a view and controller as "script/generate controller > home index" and then i changed the contents of app/view/home/ > index.html.erb file according to tutorial into one line as > <h1>Hello, Rails!</h1> > > Now i started the server as script/ > server(successfully started) and when i navigate to localhost:3000/ > home/index, i got a error message which says > > ROUTING ERROR > No route matches "/home/index" with {:method=>:get} > > Remove the /public/index.html file in your app directory.Check to see if you have a route for root in your routes.rb file. If not, make it *map.root :controller => "home"* If you still have problems, post the contents of your routes file.> Please someone help to resolve. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Kottom
2011-Apr-17 08:01 UTC
Re: No route matches "/home/index" with {:method=>:get}
Also verify that you are _actually_ using Rails 2.3.8. Very basic check, I know, but routing syntax is different in Rails 3, and I don''t believe older syntax is supported. On Sun, Apr 17, 2011 at 8:59 AM, Jatin kumar <jatinkumar.nitk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > On Sun, Apr 17, 2011 at 6:46 AM, amrit pal pathak < > amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I followed a tutorial to learn ruby on rails at >> http://guides.rubyonrails.org/v2.3.8/getting_started.html >> After creating a view and controller as "script/generate controller >> home index" and then i changed the contents of app/view/home/ >> index.html.erb file according to tutorial into one line as >> <h1>Hello, Rails!</h1> >> >> Now i started the server as script/ >> server(successfully started) and when i navigate to localhost:3000/ >> home/index, i got a error message which says >> >> ROUTING ERROR >> No route matches "/home/index" with {:method=>:get} >> >> Remove the /public/index.html file in your app directory. > Check to see if you have a route for root in your routes.rb file. > If not, make it > *map.root :controller => "home"* > If you still have problems, post the contents of your routes file. > >> Please someone help to resolve. >> >> Thanks >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
amrit pal pathak
2011-Apr-17 09:28 UTC
Re: No route matches "/home/index" with {:method=>:get}
On Apr 17, 2:59 am, Jatin kumar <jatinkumar.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, Apr 17, 2011 at 6:46 AM, amrit pal pathak <amritpalpath...@gmail.com > > > > > > > > > > > wrote: > > I followed a tutorial to learn ruby on rails at > >http://guides.rubyonrails.org/v2.3.8/getting_started.html > > After creating a view and controller as "script/generate controller > > home index" and then i changed the contents of app/view/home/ > > index.html.erb file according to tutorial into one line as > > <h1>Hello, Rails!</h1> > > > Now i started the server as script/ > > server(successfully started) and when i navigate to localhost:3000/ > > home/index, i got a error message which says > > > ROUTING ERROR > > No route matches "/home/index" with {:method=>:get} > > > Remove the /public/index.html file in your app directory. > > Check to see if you have a route for root in your routes.rb file. > If not, make it > *map.root :controller => "home"* > If you still have problems, post the contents of your routes file.I added the *map.root :controller => "home"* at the bottom of router.rb file and it worked.so i could accessed now "localhost:3000/ home/index Please explain how it (*map.root :controller => "home"*) is working (means which part calls to which). Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
amrit pal pathak
2011-Apr-17 09:29 UTC
Re: No route matches "/home/index" with {:method=>:get}
On Apr 17, 4:01 am, Chris Kottom <ch...-kMviOf/NVQxZWXO/OqhO/A@public.gmane.org> wrote:> Also verify that you are _actually_ using Rails 2.3.8. Very basic check, I > know, but routing syntax is different in Rails 3, and I don''t believe older > syntax is supported.I am running rails 2.3.5 and this format worked for me. Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jatin kumar
2011-Apr-17 09:56 UTC
Re: Re: No route matches "/home/index" with {:method=>:get}
On Sun, Apr 17, 2011 at 9:28 AM, amrit pal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Apr 17, 2:59 am, Jatin kumar <jatinkumar.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Sun, Apr 17, 2011 at 6:46 AM, amrit pal pathak < > amritpalpath...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > > > > > > > > > > > > > > > > > > > wrote: > > > I followed a tutorial to learn ruby on rails at > > >http://guides.rubyonrails.org/v2.3.8/getting_started.html > > > After creating a view and controller as "script/generate controller > > > home index" and then i changed the contents of app/view/home/ > > > index.html.erb file according to tutorial into one line as > > > <h1>Hello, Rails!</h1> > > > > > Now i started the server as script/ > > > server(successfully started) and when i navigate to localhost:3000/ > > > home/index, i got a error message which says > > > > > ROUTING ERROR > > > No route matches "/home/index" with {:method=>:get} > > > > > Remove the /public/index.html file in your app directory. > > > > Check to see if you have a route for root in your routes.rb file. > > If not, make it > > *map.root :controller => "home"* > > If you still have problems, post the contents of your routes file. > I added the *map.root :controller => "home"* at the bottom of > router.rb file and it worked.so i could accessed now "localhost:3000/ > home/index > > Please explain how it (*map.root :controller => "home"*) is > working (means which part calls to which). > > Go through the rails getting started guides if you run into issues likethese again. Google it. The first link will get you there. As far as the above is concerned, map.root tells the route for the root i.e. localhost:3000 in development or www.domain.com in production.> Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.