添加gem“webmock”后,我有“未初始化的常量Syck(NameError)”

时间:2016-07-30 15:24:18

标签: ruby-on-rails ruby testing rspec

我添加了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,但它没有帮助修复错误。我该如何解决?

0 个答案:

没有答案