Forum: Ruby on Rails routing problem?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
47832fa58842691883f324b7748c1302?d=identicon&s=25 isabisa (Guest)
on 2008-11-16 13:34
(Received via mailing list)
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:
http://roadking.homelinux.net/~alisah/cookbook/
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:
http://roadking.homelinux.net/~alisah/cookbook/recipes

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!

-Alisa
This topic is locked and can not be replied to.