Skip to content

Psych::DisallowedClass during some locale files convertion to js #798

@dsawa

Description

@dsawa

Hey,

I have recently updated React on Rails to the latest (6.9.3) and updated webpack to v2 (along with all configurations). However one thing changed that breaks my current project.

I get

Psych::DisallowedClass: Tried to load unspecified class: Symbol

every time I for example run rake commands (impossible to run migrations).

During investigation I managed to find a simple solution. Problem occurs in LocaleToJs.

If I change YAML.safe_load to just YAML.load it works. I could make a new PR with this small change, but I see that it was changed for some reason in PR that updated whole React on Rails to support webpack 2. What's the reason?

It can be pain in the ass when relying on different locale files from different gems that you not necesarrly can control. In my example, origins of the problem are from spree_i18n gem (FR translations).

Should I make PR with change to YAML.load ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions