setup rails engine and gem dependencies.