When booting a Rails application with measured-3.2.1 and json-3.0.1, I get the following error:
gems/json-3.0.1/lib/json/common.rb:302:in 'JSON::Ext::Parser.parse':
unexpected token '//' at line 1 column 1 (JSON::ParserError)
The issue appears to be caused by the JSON cache files shipped with measured, such as length.json. These files contain // comments at the beginning.
Starting with json 3.0.0, the JSON parser became stricter and no longer accepts // comments, resulting in a JSON::ParserError.
A workaround is to explicitly pin/downgrade the json gem to a version below 3.0.0, since json is also installed as a dependency of several other gems.
For future releases of measured, the // comments should be removed from the JSON cache files so that they contain valid JSON and remain compatible with newer versions of the json gem.
When booting a Rails application with measured-3.2.1 and json-3.0.1, I get the following error:
gems/json-3.0.1/lib/json/common.rb:302:in 'JSON::Ext::Parser.parse':
unexpected token '//' at line 1 column 1 (JSON::ParserError)
The issue appears to be caused by the JSON cache files shipped with measured, such as length.json. These files contain // comments at the beginning.
Starting with json 3.0.0, the JSON parser became stricter and no longer accepts // comments, resulting in a JSON::ParserError.
A workaround is to explicitly pin/downgrade the json gem to a version below 3.0.0, since json is also installed as a dependency of several other gems.
For future releases of measured, the // comments should be removed from the JSON cache files so that they contain valid JSON and remain compatible with newer versions of the json gem.