简体   繁体   中英

Bundler::GemRequireError: There was an error while trying to load the gem 'omniauth-oauth2'

I have a bizzare error and i do not seem to find any way to fix it. Basically my heroku deployment fails with that message.

More:

Removing bourbon (4.3.1)
remote:        Removing hashie (3.5.1)
remote: -----> Detecting rake tasks
remote: sh: 3: Syntax error: Unterminated quoted string
remote: sh: 3: Syntax error: Unterminated quoted string
remote:  !
remote:  !     Could not detect rake tasks
remote:  !     ensure you can run `$ bundle exec rake -P` against your app
remote:  !     and using the production group of your Gemfile.
remote:  !     rake aborted!
remote:  !     Bundler::GemRequireError: There was an error while trying to load the gem 'omniauth-oauth2'.
remote:  !     Gem Load Error is: private method `warn' called for nil:NilClass
remote:  !     Backtrace for gem load error is:
remote:  !     /tmp/build_569fee1a9e7d8fb80c93fc3634a76861/vendor/bundle/ruby/2.2.0/gems/hashie-3.5.2/lib/hashie/mash.rb:334:in `log_built_in_message'

i tried a lot of stuff, cleaning assets, precompiling, tmp clear, updating gems, running gem pristine, nothing seems to work.

it was working fine yesterday - and today i was no way near touching the gemfile or omniauth

Any help appreciated.

Turns out hashie gem version 3.5.2 and omniauth-oauth2 1.3.1 do not mix well.

Reverted back to hashie gem 3.4.4 and works.

Version 3.5.3+ of Hashie will solve the problem for you now. We added some logging to the gem to help people that were getting unexpected behavior from setting keys with names that collided with built-in methods in Hash. That logging caused a bunch of issues in OmniAuth and the Elasticsearch gems. Those problems have all been fixed and we have good test coverage for integrations with OmniAuth and will be adding tests for Elasticsearch as well.

Apologies for the problems. Please let us know at https://github.com/intridea/hashie/issues if any more problems occur!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM