rails app using sql