laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org
2008-Jan-10 01:15 UTC
beginner question: getting a routing error, but method is defined!
Hi,
I''m just starting in Ruby on Rails. I have these files:
/webroot/formprocessor/app/views/formprocessor/showform.rhtml
/webroot/formprocessor/app/views/formprocessor/show_formdata.rhtml
/webroot/formprocessor/app/controllers/formprocessor_controller.rb
Here are the contents of teh formprocessor_controller.rb:
class FormprocessorController < ApplicationController
def showform
end
def show_formdata
@name = params[:name]
@prog_languages = params[:prog_languages] || []
@operating_systems = params[:operating_systems] || []
end
end
But after starting my server (ruby /webroot/formprocessor/script/
server), and visiting http://mydomain:3000/formprocessor/showform, I
get this error:
Routing Error
no route found to match "/formprocessor/showform" with
{:method=>:get}
But the showform method and views are defined, at least in my mind
anyway. What am I missing?
Thanks, - Dave
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Jeremy Weiskotten
2008-Jan-10 01:21 UTC
Re: beginner question: getting a routing error, but method i
Does your routes file specify the default route? map.connect '':controller/:action/:id'' -- 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 -~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2008-Jan-10 01:44 UTC
Re: beginner question: getting a routing error, but method is defined!
Can you show us your routes file? On Jan 10, 2008 11:45 AM, laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org < laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org> wrote:> > Hi, > > I''m just starting in Ruby on Rails. I have these files: > > /webroot/formprocessor/app/views/formprocessor/showform.rhtml > /webroot/formprocessor/app/views/formprocessor/show_formdata.rhtml > /webroot/formprocessor/app/controllers/formprocessor_controller.rb > > Here are the contents of teh formprocessor_controller.rb: > > class FormprocessorController < ApplicationController > def showform > end > > def show_formdata > @name = params[:name] > @prog_languages = params[:prog_languages] || [] > @operating_systems = params[:operating_systems] || [] > end > end > > But after starting my server (ruby /webroot/formprocessor/script/ > server), and visiting http://mydomain:3000/formprocessor/showform, I > get this error: > > Routing Error > no route found to match "/formprocessor/showform" with {:method=>:get} > > But the showform method and views are defined, at least in my mind > anyway. What am I missing? > > Thanks, - Dave > > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---