Ruby on Rails

software development


I am trying to deploy my first app on Dreamhost using Ruby on Rails. I followed the wiki, but I think I am missing something. I think it may be in my RoR code, but I am not sure.

My app runs fine when run as http://localhost:3000/AddPatientVisit/addvisits

AddPatientVisit is the controller and addvisits is the form that posts back to the controller.

I got rid of the index.html in public (it did get served up before I deleted it).

I think my route is wrong, but I don’t know how to direct it to the page above. I should point out that my controller doesn’t have an index method, just an action that is called by the addvisits.rhtml when the user hits the “submit” button.

Here is my route:
map.connect ‘’, :controller => “AddPatientVisit”

I am very much a noob at this, so thank you for your help!


Off the top of my head, you could add an index method to your AddPatientVisit controller:

def index render :addvisits end

If you want useful replies, ask smart questions.


I tried that, but to no avail. Instead I put my “addvisits” code into an index.html file in the add_patient_visit folder in the app/views.

Now the appropriate page shows up, but when I click the submit button, it can’t find the action addptvisit

This setup works fine in webrick, so I am thinking it’s a route problem again?!?