updating rack, rails and json