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

Does your routes file specify the default route?

map.connect ‘:controller/:action/:id’

Can you show us your routes file?

On Jan 10, 2008 11:45 AM, [email protected] <
[email protected]> wrote:

Thanks, - Dave


Ryan B.

Feel free to add me to MSN and/or GTalk as this email.