jmespath.rb
jmespath.rb copied to clipboard
Another json_pure problem (Ruby 2.3.1)
I saw Issue #20 but there it was concluded this problem can only affect Ruby 1.9.3. I came across this problem while doing a routine gem update on Ruby 2.3.1.
In particular we got this error message on our CI server (Solano):
NoMethodError: undefined method `key?' for # /home/u1926/bundle/ruby/2.3.0/gems/activemodel-4.2.6/lib/active_model/serializers/json.rb:89:in `as_json'
We also got these warnings:
/home/u1926/bundle/ruby/2.3.0/gems/json_pure-1.8.3/lib/json/version.rb:3: warning: already initialized constant JSON::VERSION
/home/tddium/.rbenv/versions/2.3.1/lib/ruby/2.3.0/json/version.rb:4: warning: previous definition of VERSION was here
Should be noted the issue didn't happen locally for me, but was happening in CI. Adding jmespath to Gemfile and version locking it to 1.2.1 solved the issue for now. I am also following up with Solano to see if anything is happening on their end relating to this.
Closed by #35. We've removed the dependency on json_pure, and have added some additional code to deal with the old Ruby 1.9.3 & JSON 1.5.5 differences.