Forum: Ruby on Rails Ruby path?

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.
on 2007-02-20 07:21
(Received via mailing list)
Do I have to setup some sort of .htaccess file?

right now I have ruby setup with a small demo app called: "say"

If you browse to the url: you see the
whole directory contents, you can see what's in the controllers, etc.
I don't want that to happen.

Additionally, if you HAVE to browse to the public folder in the demo
app just execute the pages such as: /public/say/hello/. I want it work
like a normal directory and if you type in the url:
say/hello it should work. Do I need a .htaccess file to do this? What
are remedies around this?
on 2007-02-20 23:56
(Received via mailing list)
For anyone curious on how this can be done, it requires two edits!

One add .htaccess file with (this goes in the directory above public:
RewriteEngine On
RewriteRule ^public/(.*)$ - [L]
RewriteRule ^(.*)$ public/$1 [L,QSA]

Next edit config/environment.rb:
Add this to the end:

ActionController::AbstractRequest.relative_url_root = "/

On Feb 19, 10:20 pm, "removed_email_address@domain.invalid"
This topic is locked and can not be replied to.