create the Application class inside a module
and add a root_path attribute to get the application
root_path throughout the application.

Considering that "AppName" is the class name provided
the app class will now be:

AppName::Application

You can access the root path:

AppName::Application.root_path