rails + sinatra simple equation solver