ginjo / omniauth-slack

omniauth-slack ruby gem
https://rubygems.org/gems/ginjo-omniauth-slack
MIT License
42 stars 31 forks source link

Gem Load Error is: uninitialized constant OmniAuth::OAuth2::Response #12

Open taiyop opened 4 years ago

taiyop commented 4 years ago

Hi,

I couldn't start rails app because of Gem Load Error is: uninitialized constant OmniAuth::OAuth2::Response.

environments

When I comment out the following refine block, I could start it. ↓

module OmniAuth
  module Slack

    module OAuth2Refinements
      refine OAuth2::Response do
        # TODO: This might not be used any more.
        def to_auth_hash
          Module.const_get('::OmniAuth::Slack::AuthHash').new(parsed)
        end
      end
    end
ginjo commented 4 years ago

Hi @taiyop . I wasn't able to reproduce the error that you found, but I did find some other errors that may or may not have been part of the issue. I reworked some of the code, including where you found the error. Give the master branch a try now, and let me know if it fixes the problem.

taiyop commented 4 years ago

Hi @ginjo. Thank you for your reply. :)

Now I update this gem to v2.5.0, so I could resolve this issue. ↓ the following code may resolve this. https://github.com/ginjo/omniauth-slack/commit/f4c24b45ef31c410c4350d8123a44c1e13970b2c#diff-3c39ff960a38f71f09b3dfd28f5aaf79R17

So please close this issue if you don't need this issue anymore.

Thanks a lot.

ginjo commented 4 years ago

Thanks @taiyop , I'll close this issue. But feel free to post back or open it again if you continue to have errors.