Ruby path?

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: http://www.myurl.com/ruby_test/ 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: url.com/ruby_test/
say/hello it should work. Do I need a .htaccess file to do this? What
are remedies around this?

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 = “/
rails_app_directory_name_here”

On Feb 19, 10:20 pm, “[email protected]

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