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

undefined method <=> for :x_auth_username:Symbol #23

Closed
ghost opened this issue Sep 14, 2012 · 1 comment
Closed

undefined method <=> for :x_auth_username:Symbol #23

ghost opened this issue Sep 14, 2012 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 14, 2012

Here is a mostly complete stack trace...

/Library/Ruby/Gems/1.8/gems/oauth-0.4.7/lib/oauth/helper.rb:37:in `<=>': undefined method `<=>' for :x_auth_username:Symbol (NoMethodError)
    from /Library/Ruby/Gems/1.8/gems/oauth-0.4.7/lib/oauth/helper.rb:37:in `sort'
    from /Library/Ruby/Gems/1.8/gems/oauth-0.4.7/lib/oauth/helper.rb:37:in `normalize'
    from /Library/Ruby/Gems/1.8/gems/oauth-0.4.7/lib/oauth/consumer.rb:359:in `create_http_request'
    from /Library/Ruby/Gems/1.8/gems/oauth-0.4.7/lib/oauth/consumer.rb:187:in `create_signed_request'
    from /Library/Ruby/Gems/1.8/gems/oauth-0.4.7/lib/oauth/consumer.rb:159:in `request'
    from /Library/Ruby/Gems/1.8/gems/oauth-0.4.7/lib/oauth/consumer.rb:194:in `token_request'
    from /Library/Ruby/Gems/1.8/gems/twurl-0.7.0/bin/../lib/twurl/oauth_client.rb:85:in `exchange_credentials_for_access_token'
    from /Library/Ruby/Gems/1.8/gems/twurl-0.7.0/bin/../lib/twurl/authorization_controller.rb:6:in `dispatch'
    from /Library/Ruby/Gems/1.8/gems/twurl-0.7.0/bin/../lib/twurl/abstract_command_controller.rb:7:in `dispatch'
    from /Library/Ruby/Gems/1.8/gems/twurl-0.7.0/bin/../lib/twurl/cli.rb:31:in `dispatch'
    from /Library/Ruby/Gems/1.8/gems/twurl-0.7.0/bin/../lib/twurl/cli.rb:14:in `run'
    from /Library/Ruby/Gems/1.8/gems/twurl-0.7.0/bin/twurl:4
    from /usr/bin/twurl:19:in `load'
    from /usr/bin/twurl:19

I fixed this locally by changing Twurl::OAuthClient#client_auth_parameters to return strings instead of symbols...

    def client_auth_parameters
      {'x_auth_username' => username, 'x_auth_password' => password, 'x_auth_mode' => 'client_auth'}
    end

Maybe this is a OAuth issue?

@desandro
Copy link

Had the same issue. Thank you @axelator for the hotfix.

@sferik sferik closed this as completed in 3fe548e Sep 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants