当使用Ruby v 2.2.0运行minitest时,我收到以下错误,是否有人就如何解决此问题提出建议?
错误:
/Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:22:in `block (2 levels) i
n <class:Notifier>': undefined method `dump' for Psych:Module (NoMethodError)
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/nenv-0.2.0/lib/nenv/environment/dumper.rb:5:in `call'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/nenv-0.2.0/lib/nenv/environment/dumper.rb:5:in `dump'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/nenv-0.2.0/lib/nenv/environment.rb:47:in `block in _create_env_method'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:93:in `add'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:64:in `block (2 levels) in detect'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:62:in `each'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:62:in `detect'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:62:in `block in detect'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:61:in `each'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:61:in `detect'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier.rb:105:in `initialize'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier.rb:42:in `new'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/notiffany-0.0.6/lib/notiffany/notifier.rb:42:in `connect'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/guard-2.12.7/lib/guard/notifier.rb:11:in `connect'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/guard-2.12.7/lib/guard/notifier.rb:31:in `notify'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/guard-minitest-2.3.1/lib/guard/minitest/notifier.rb:34:in `noti
fy'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/guard-minitest-2.3.1/lib/guard/minitest/reporter.rb:11:in `repo
rt'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/minitest-5.7.0/lib/minitest.rb:638:in `each'
from /Users/jamie/.rvm/gems/ruby-2.2.0/gems/minitest-5.7.0/lib/minitest.rb:638:in `report'
...........
答案 0 :(得分:0)
我可以使用Ruby 2.3.0而不是Ruby 2.2.0来解决同样的问题。