Routing problem?

Hi everyone,

Please have patience with me if this is a stupid question, but I’m new
to Ruby and very new to RoR. Basically, I have created a simple
scaffold for recipes.

It worked just fine on my local computer, I uploaded it to my server,
did a database migration - everything transferred great. The problem
comes when trying to link to any pages other than index.

The only thing I have changed in my routes.rb file is that I added
this line:

map.root :controller => “recipes”

So if you go to:
It loads the index page from the controller.

But the ‘new recipe’ link that was created through the scaffold no
longer works… How do I go about fixing this? It looks like it’s
trying to load /~alisah/cookbook/recipes/new so I tried /~alisah/
cookbook/new and that doesn’t work either.

Also, when I comment out the map.root line in the routes.rb file,
going to this link doesn’t work at all:

I thought that routes.rb was supposed to resolve requests like that
through the default routes of map.connect ‘:controller/:action/:id’?

Keep in mind that all of this worked great on my local computer! The
server is running Apache2, Passenger, and Rails 2.1.2.

I have searched and searched and not been able to find anything about
this. Someone please help!


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs