Ruby on Rails
ApplicationRoot (Version #3)

The base location of a Rails Application, from which all the files in it are accessed.

From the developer’s perpective, this is the directory created by running rails appname. It contains sub directories such as app, config, public, etc.

From the webservers view, it is the public directory mentioned above. To access the sibling directories, Rails walks the directory tree (e.g. ”../config/” or ”../app/”)

From the browsers point of view it is the prefix of all of the URLs relating to the application (e.g. “<a href="http://www.railsomatic.org/wunderapp/">http://www.railsomatic.org/wunderapp/</a>“).

All of these are related by Routes; see UnderstandingHowRequestsAreRouted for more detailed information.

The application root can be found in the RAILS_ROOT constant.

Contrast with DocumentRoot.

Category: Glossary

The base location of a Rails Application, from which all the files in it are accessed.

From the developer’s perpective, this is the directory created by running rails appname. It contains sub directories such as app, config, public, etc.

From the webservers view, it is the public directory mentioned above. To access the sibling directories, Rails walks the directory tree (e.g. ”../config/” or ”../app/”)

From the browsers point of view it is the prefix of all of the URLs relating to the application (e.g. “<a href="http://www.railsomatic.org/wunderapp/">http://www.railsomatic.org/wunderapp/</a>“).

All of these are related by Routes; see UnderstandingHowRequestsAreRouted for more detailed information.

The application root can be found in the RAILS_ROOT constant.

Contrast with DocumentRoot.

Category: Glossary