I have been programming in RoR for about 2 months now, but the projects that I have started I have aloways started in the middle, so I have never built anything from the ground up. I''m now trying to start from the beginning and am getting a strange error message when trying to load the first page: no route found to match "/music/index.rhtml" with {:method=>:get} Now, there is a method for index but it just redirect_to another method and page. This should be working but I;m wondering if I don''t have some strange configuration issue somewhere? Thanks in advance, -S -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
what does your redirect_to line look like? And is this in your music_controller? Adam On 8/8/07, Shandy Nantz <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I have been programming in RoR for about 2 months now, but the projects > that I have started I have aloways started in the middle, so I have > never built anything from the ground up. I''m now trying to start from > the beginning and am getting a strange error message when trying to load > the first page: > > no route found to match "/music/index.rhtml" with {:method=>:get} > > Now, there is a method for index but it just redirect_to another method > and page. This should be working but I;m wondering if I don''t have some > strange configuration issue somewhere? Thanks in advance, > > -S > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Adam Cohen wrote:> what does your redirect_to line look like? And is this in your > music_controller? > > Adamit just says: redirect_to :action => ''welcome'' and yes, it is in the music_controller. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Shandy Nantz wrote:> Adam Cohen wrote: >> what does your redirect_to line look like? And is this in your >> music_controller? >> >> Adam > > it just says: > > redirect_to :action => ''welcome'' > > and yes, it is in the music_controller.what do you have in your config/routes.rb file? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Shai Rosenfeld wrote:> Shandy Nantz wrote: >> Adam Cohen wrote: >>> what does your redirect_to line look like? And is this in your >>> music_controller? >>> >>> Adam >> >> it just says: >> >> redirect_to :action => ''welcome'' >> >> and yes, it is in the music_controller. > > what do you have in your > config/routes.rb file?It''s just the standard routes: map.connect '':controller/:action/:id'' and a couple others. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> map.connect '':controller/:action/:id'' and a couple others.the order of the routes that you put there could be causing a mess (if you are asking about configuration issues that has to do with routing, it would be in this file; therefore, this may be the problem.) - make sure the settings are in the correct order: the routes that appear on the top are higher precedence than the ones at the bottom. (even if you know this, it can be confusing, and this could be a problem of a route ''overwriting'' a different one.) aside from that, just at looking at the error>> no route found to match "/music/index.rhtml" with {:method=>:get}is a little odd; is the url you are directing to end with "...rhtml" ? if you were just plain redirecting to :action => :music, it would error out like> no route found to match "/music/index"anyway. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Shai Rosenfeld wrote:> >> map.connect '':controller/:action/:id'' and a couple others. > > the order of the routes that you put there could be causing a mess (if > you are asking about configuration issues that has to do with routing, > it would be in this file; therefore, this may be the problem.) - make > sure the settings are in the correct order: the routes that appear on > the top are higher precedence than the ones at the bottom. (even if you > know this, it can be confusing, and this could be a problem of a route > ''overwriting'' a different one.) > > aside from that, just at looking at the error > >>> no route found to match "/music/index.rhtml" with {:method=>:get} > > is a little odd; is the url you are directing to end with "...rhtml" ? > if you were just plain redirecting to :action => :music, it would error > out like > >> no route found to match "/music/index" > > anyway.The redirect does end in .rhtml but in my controller I am saying redirect_to :action => ''welcome" I have tried it with just putting a simple "Hello World" for the index page and that works. Its just when I try and redirect from the index method to my welcome page do I get this error. Thanks, ~S -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---