Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibilty with Psych 4 (and Solidus v3.1.7) #2361

Closed
afdev82 opened this issue Jul 22, 2022 · 1 comment
Closed

Compatibilty with Psych 4 (and Solidus v3.1.7) #2361

afdev82 opened this issue Jul 22, 2022 · 1 comment

Comments

@afdev82
Copy link
Contributor

afdev82 commented Jul 22, 2022

Steps to reproduce

I'm using Alchemy v6 with Solidus v3.1.7.
Just starting the application server throws an error and the server stops.

Expected behavior

The application starts without problems.

Actual behavior

I'm getting the following error:

wrong number of arguments (given 4, expected 1) (ArgumentError)
  /home/antonio/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/psych-4.0.4/lib/psych.rb:322:in `safe_load'
  /home/antonio/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/bundler/gems/alchemy_cms-d5f1dad16a55/lib/alchemy/config.rb:58:in `read_file'
  /home/antonio/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/bundler/gems/alchemy_cms-d5f1dad16a55/lib/alchemy/config.rb:41:in `alchemy_config'
  /home/antonio/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/bundler/gems/alchemy_cms-d5f1dad16a55/lib/alchemy/config.rb:27:in `show'
  /home/antonio/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/bundler/gems/alchemy_cms-d5f1dad16a55/lib/alchemy/config.rb:12:in `get'
  /home/antonio/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/bundler/gems/alchemy_cms-d5f1dad16a55/app/models/alchemy/attachment.rb:88:in `<class:Attachment>'
  /home/antonio/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/bundler/gems/alchemy_cms-d5f1dad16a55/app/models/alchemy/attachment.rb:21:in `<module:Alchemy>'
  /home/antonio/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/bundler/gems/alchemy_cms-d5f1dad16a55/app/models/alchemy/attachment.rb:20:in `<main>'

System configuration

  • Alchemy Version: v6.0.0
  • Rails Version: 6.1.6.1
  • Solidus Version: 3.1.7

The version of Solidus used requires Psych 4 and I saw that Alchemy uses the safe_load method that needs to be adapted or replaced with unsafe_load as already done in Rails.
See also this issue: ruby/psych#533

@afdev82
Copy link
Contributor Author

afdev82 commented Jul 22, 2022

I've just realized that I was running the v6.0.0 of Alchemy, with the latest version (v6.0.5) I don't have this problem.
Sorry for the noise.

@afdev82 afdev82 closed this as completed Jul 22, 2022
sajoku added a commit to sajoku/alchemy_cms that referenced this issue Mar 28, 2023
- Psych 4 has changed their syntax so account for that
- Taken from: AlchemyCMS/alchemy_cms@v6.0.0...v6.0.5 which I got too from here; AlchemyCMS#2361
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant