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

mail_room doesn't start with Ruby 3.2.x #2981

Open
ibaranov91 opened this issue Aug 6, 2024 · 0 comments
Open

mail_room doesn't start with Ruby 3.2.x #2981

ibaranov91 opened this issue Aug 6, 2024 · 0 comments

Comments

@ibaranov91
Copy link

Hello, I've recenly had some issue with mail_room which I solved by fixing mail_room.rb.

Version: 17.2.1

Issue: Mail_room doesn't start

Errors in docker log

2024-08-06 20:20:00,274 INFO success: mail_room entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-08-06 20:20:00,368 INFO exited: mail_room (exit status 1; not expected)
2024-08-06 20:20:00,588 INFO spawned: 'mail_room' with pid 9838
2024-08-06 20:20:01,685 INFO success: mail_room entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-08-06 20:20:01,740 INFO exited: mail_room (exit status 1; not expected)
2024-08-06 20:20:02,304 INFO spawned: 'mail_room' with pid 9839
2024-08-06 20:20:03,519 INFO success: mail_room entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-08-06 20:20:03,524 INFO exited: mail_room (exit status 1; not expected)
2024-08-06 20:20:03,599 INFO spawned: 'mail_room' with pid 9841

Errors in mail_room.log

bundler: failed to load command: mail_room (/home/git/gitlab/vendor/bundle/ruby/3.2.0/bin/mail_room)
/usr/local/lib/ruby/3.2.0/psych/class_loader.rb:99:in `find': Tried to load unspecified class: Symbol (Psych::DisallowedClass)
        from /usr/local/lib/ruby/3.2.0/psych/class_loader.rb:28:in `load'
        from (eval):2:in `symbol'
        from /usr/local/lib/ruby/3.2.0/psych/class_loader.rb:32:in `symbolize'
        from /usr/local/lib/ruby/3.2.0/psych/class_loader.rb:84:in `symbolize'

Solution was to update one line in mail_room.rb

      def load_yaml
        #@yaml ||= YAML.safe_load_file(config_file, aliases: true)[rails_env].deep_symbolize_keys
        @yaml ||= YAML.safe_load_file(config_file, aliases: true, permitted_classes: [Symbol])[rails_env].deep_symbolize_keys
      end
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