get it working with the rails enviromnet