undefined method `parse' for JSON::Ext::Parser:Class
Closed this issue · 4 comments
mullermp commented
Something in json 2.8.0 or 2.7.6 breaks usage of AWS SDK for Ruby / JRuby 9.4 related to the json class.
undefined method `parse' for JSON::Ext::Parser:Class
This happens when doing require 'aws-sdk-dynamodb'
Example CI - https://github.com/aws/aws-sessionstore-dynamodb-ruby/actions/runs/11707818540/job/32608074498
I've confirmed pinning to 2.7.5 with JRuby solves the issue.
byroot commented
Looking.
byroot commented
I'm able to repro locally, somehow jruby
is loading the jar that is bundled with JRuby instead of the one bundled in the gem:
>> $LOADED_FEATURES.grep(/json/)
=>
["/Users/byroot/.gem/rubies/jruby-9.4.8.0/gems/json-2.8.0.1-java/lib/json/version.rb",
"/Users/byroot/.gem/rubies/jruby-9.4.8.0/gems/json-2.8.0.1-java/lib/json/common.rb",
"/opt/rubies/jruby-9.4.8.0/lib/ruby/stdlib/json/ext/parser.jar",
"/opt/rubies/jruby-9.4.8.0/lib/ruby/stdlib/json/ext/generator.jar",
"/Users/byroot/.gem/rubies/jruby-9.4.8.0/gems/json-2.8.0.1-java/lib/json/ext.rb",
"/Users/byroot/.gem/rubies/jruby-9.4.8.0/gems/json-2.8.0.1-java/lib/json.rb"]
Digging more.
byroot commented
Fixed in 2.8.1
. Thanks for the report.