我遵循Hartl https://www.railstutorial.org/book/static_pages#sec-getting_started_with_testing的rails tutorial
并安装了所需的所有内容,到目前为止,除了运行rake test
之外,它都有效。
测试运行但之后我得到一系列错误,如下所示。我不知道这些是什么以及如何解决它们。
有什么想法吗?
/home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/tmux.rb:35:in
version': undefined method
[]' for nil:NilClass(NoMethodError) 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/tmux.rb:194:in_check_available' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/base.rb:59:in
初始化' 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:92:innew' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:92:in
添加' 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:64:inblock (2 levels) in detect' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:62:in
各' 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:62:indetect' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:62:in
阻止检测' 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:61:ineach' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier/detected.rb:61:in
检测' 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier.rb:105:ininitialize' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier.rb:42:in
新' 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/notiffany-0.0.6/lib/notiffany/notifier.rb:42:inconnect' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/notifier.rb:11:in
连接' 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/notifier.rb:31:innotify' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/guard-compat-1.2.1/lib/guard/compat/plugin.rb:113:in
通知' 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/guard-minitest-2.4.4/lib/guard/minitest/notifier.rb:31:innotify' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/guard-minitest-2.4.4/lib/guard/minitest/reporter.rb:10:in
报告' 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/minitest-5.6.1/lib/minitest.rb:638:ineach' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/minitest-5.6.1/lib/minitest.rb:638:in
报告' 来自/home/cuser/.rvm/gems/ruby-2.2.1/gems/minitest-5.6.1/lib/minitest.rb:134:inrun' from /home/cuser/.rvm/gems/ruby-2.2.1/gems/minitest-5.6.1/lib/minitest.rb:56:in
阻止自动运行'
答案 0 :(得分:0)
你在使用tmux吗?如果没有,那么我会删除配置,告诉tmux在测试完成后通知你。这个配置可能在test_helper.rb中,但如果没有看到您正在关注哪个教程,很难知道。
答案 1 :(得分:0)
安装tmux实际上为我解决了这个问题!