Forum: Ruby on Rails How to do routing ?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1f7eb58e63aae3476bfd36409ad589bf?d=identicon&s=25 Nahalingam n. K. (nahalingam)
on 2006-06-14 14:01
(Received via mailing list)
Hi folks,

I am working in Fedora Core 2 Linux, and using Apache 2.0 and
as per mentioned in the following link, to support Rails.

I had created virtual host and specified the path to my application's
/var/www/html/myapp/public/ directory as a value for DocumentRoot

Now what is happening is that,
my index.html page is loading.

As per the example program development steps given in the tutorial
I had created database, tables, controllers, everything. but when i call
it could not be located properly. But the same application code is
properly with Webrick server within
the frame work.

Please help my dear folks, in this regards, by teach me how to call
and how to proceed further. I was stuck at this stage, being not having
helping hands near by.

Please help me with your valuable suggestions.

thanks in advance.
Chris Selmer (Guest)
on 2006-06-14 14:10
(Received via mailing list)
You'll have to remove the index.html page in order for your app to
work.  Rails works by acting as the default 404-file-not-found error
page, so when you make a request for the site root and there is an
index.html, rails isn't even called, and the index.html is served to

In order for your site root to serve up a certain page, you'll also
need to edit the config/routes.rb file - check it out, there are
plenty of comments in there that will explain what to do.

Best of luck,
1f7eb58e63aae3476bfd36409ad589bf?d=identicon&s=25 Nahalingam n. K. (nahalingam)
on 2006-06-15 10:05
(Received via mailing list)

First of all, I would like to convey my gratitude to our folks, who has
showed me the
path to proceed furthur. Really, this is the place where newbies like
can get help.

Actually, as per your suggestions I have removed index.html from public/
Now it is apache's part to use .htaccess file to call appropirate
but I think that my apache is not doing so.

In my .htaccess file, I have changed the dispatcher configuration to
fcgi files,
like the following,

RewriteRule ^(.*)$ /dispatch.fcgi?$1 [QSA,L]

and my file is also having the hander declarations, that is

AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

The above three lines is also there in my .htaccess file.

And then, I am having a controller called as MyTest. so, I have modifed
routes.rb files
to call that controller through the following line of code

   map.connect '', :controller => 'MyTest', :action => 'index'

now also this configuration is not working with Apache.

But, this is working fine, and the controller is called properly, when I
using Webrick server.

Please help me with your valiable suggestions, in this regards.
This topic is locked and can not be replied to.