pry working but routes are in infinite loop