extract the rails engine functionality into a stand-alone gem, and use it.