Base directory for rails

software development

#1

When using rails on my laptop, with webbrick, my base directory is the application itself. E.g.

[quote]rails toy

[/quote]

The base directory is …/toy/

When I am on DreamHost (under control of apache), the base directory is …/toy.xxx.xxx/public/, where xxx.xxx is my subdomain name for the rail application.

Could somebody share with me how to have the same base directory in the two scenarios described? The reason this is important is that I load yaml files stored under toy/config,
so that in one case I must do:

YAML::load(“config/filename.yml”)

in the other case, I must do

YAML::load("…/config/filename.yml")

Of course, I could have an environment variable that stores
the base directory or some kind of file I read it from, but that
should be how its done.

Thanks,

Gordon

Gordon Erlebacher
School of Computational Science
Florida State University
Tallahassee, Florida


#2

I would like to know this to as it is currently braking my file upload…


MIND Productions | Juice10