load engine.rb only when Rails const is defined