Skip to content

Instantly share code, notes, and snippets.

@alexharris
Created June 29, 2013 03:11
Show Gist options
  • Select an option

  • Save alexharris/5889544 to your computer and use it in GitHub Desktop.

Select an option

Save alexharris/5889544 to your computer and use it in GitHub Desktop.
BitlyError in TweetsController#show
INVALID_URI - '500'
Rails.root: /Users/alexharris/Sites/twhatever
Application Trace | Framework Trace | Full Trace
app/controllers/tweets_controller.rb:38:in `show'
Request
Parameters:
{"utf8"=>"✓",
"username"=>"alexharris6",
"term"=>"dog bonerz",
"commit"=>"Search",
"id"=>"show"}
Show session dump
Show env dump
Response
Headers:
None
##this works to correctly give me a bitly shortened URL for the google url
#controller
@short_url = bitly.shorten('http://www.google.com').short_url
#view
short url: <%= @short_url %>
##this gives me the full url of the current page, including paramters
short url: <%= request.url %>
##I would like to combine these, like:
@short_url = bitly.shorten(request.url).short_url
#but that provides the error page shown in the next file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment