Almost working rails support