Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gzip response from twitter API #70

Closed
skyeagle opened this issue Dec 17, 2013 · 2 comments
Closed

Gzip response from twitter API #70

skyeagle opened this issue Dec 17, 2013 · 2 comments

Comments

@skyeagle
Copy link

It is for ruby 2.0.

I had the exception at the beggining of authentication:

NoMethodError (undefined method `encoding' for nil:NilClass):
  /home/storage_production/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/cgi/util.rb:7:in `escape'
  oauth (0.4.7) lib/oauth/tokens/request_token.rb:29:in `block in build_authorize_url'
  oauth (0.4.7) lib/oauth/tokens/request_token.rb:29:in `each'
  oauth (0.4.7) lib/oauth/tokens/request_token.rb:29:in `map'
  oauth (0.4.7) lib/oauth/tokens/request_token.rb:29:in `build_authorize_url'
  oauth (0.4.7) lib/oauth/tokens/request_token.rb:9:in `authorize_url'
  omniauth-oauth (1.0.1) lib/omniauth/strategies/oauth.rb:37:in `request_phase'
  omniauth-twitter (1.0.1) lib/omniauth/strategies/twitter.rb:60:in `request_phase'

The investigation revealed that issue with gziped response from twitter api and ruby 2.0 doesn't handle it by default.
This stackoverflow answer solves the issue.

@ccschmitz
Copy link

I've run into this as well, but have other apps running on the same stack, Ruby 2.1 and Rails 4.0.3, that don't have this issue. I'll report back if I figure anything out.

@raysrashmi
Copy link
Collaborator

Closing. Reopen it if you still have this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants