Fix railtie

The railtie was expecting the module to be defined but was required before the first definition of the module.