我添加了gem“webmock”并开始出错:
$ rspec
/home/me/.gem/ruby/2.3.1/gems/safe_yaml-1.0.1/lib/safe_yaml/syck_node_monkeypatch.rb:42:in `<top (required)>': uninitialized constant Syck (NameError)
我试过把它包括在内:
module SafeYAML
YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : (defined?(Psych) && YAML == Psych ? "psych" : "syck")
end
进入不同的初始化文件,例如application.rb和initializers / my_init.rb,但它没有帮助修复错误。我该如何解决?