undefined method `safe_load' for Syck:Module
Describe the bug
I have a gem 'syck', "1.4.1" gem. Everything works fine unless I add gem 'elastic-apm', "4.7.2"
Steps to reproduce
Expected behavior
Environment
- OS: Docker container
- Ruby version: 2.4.6
- Framework and version: 3.2.22.5
- APM Server version:
- Agent version:
Additional context
Add any other context about the problem here.
- Agent config options
Click to expand
replace this line with your agent config options remember to mask any sensitive fields like tokens
Hi @imi56 Thanks for reporting this, I'll take a look and have an update soon.
Hi @imi56 this is due to there being no safe_load method defined on Syck, which is the module value set to the YAML constant when the syck gem is installed. So I've changed the code to confirm that safe_load is defined before using it and then fall back to load if it's not. Just FYI, using load is discouraged due to security issues. If it's possible to use psych instead so the code can use the safe_load method, that would probably be a lot better. I've opened a draft PR, and I'm just working on now how to properly test it.
Hi @imi56 did you have a chance to check out the PR? Let me know if it's a reasonable solution for you. Thanks!