move solve.rb to application_controller