You don't specify what the error message is. :-)
I ran your code and the response.body had "400 The plain HTTP request was sent to HTTPS port"
Looks like you need to force SSL with:
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
Example:
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
request = Net::HTTP::Post.new(uri.request_uri)
New code gets a json response:
{"error": {"message": "You did not pass a valid OAuth access token.", "code": 261}}
Assume adding in the correct access token will resolve the issue.
As a side note, you might also want to move the controller code into a Model