railstutorial.org gems/notiffany-0.1.1/lib/notiffany/notifier/tmux/client.rb:12:in `version':未定义的方法 [英] railstutorial.org gems/notiffany-0.1.1/lib/notiffany/notifier/tmux/client.rb:12:in `version': undefined method

查看:31
本文介绍了railstutorial.org gems/notiffany-0.1.1/lib/notiffany/notifier/tmux/client.rb:12:in `version':未定义的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注 RailsTutorial.org 上的 Ruby on Rails 教程,并在第 3.3.1 节 (/book/static_pages#cha-static_pages) 上第一次运行rails 测试".我根据建议使用 Cloud9 IDE,据我所知,我完全遵循了脚本.一切都已匹配到这一点.

I'm following the Ruby on Rails tutorial at RailsTutorial.org and am on section 3.3.1 (/book/static_pages#cha-static_pages) for running 'rails test' for the first time. I'm using the Cloud9 IDE per the recommendation and as far as I can tell I have followed the script exactly. Everything has matched up to this point.

我还对错误进行了一些搜索,并提出了有关 tmux 的评论,但我对 Ruby on Rails 或 Cloud9 的经验不足,无法确定我在做什么.有人还建议将bundle exec rake test"作为替代方法,但我得到了同样的错误:

I have also done some searches on the error and come up with comments about something called tmux but I'm not sufficiently experienced enough in Ruby on Rails or Cloud9 to be sure of what I'm doing. Someone also recommended doing 'bundle exec rake test' as an alternative but I get the same error:

2 runs, 2 assertions, 0 failures, 0 errors, 0 skips
/usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/tmux/client.rb:12:in 'version': undefined method '[]' for nil:NilClass (NoMethodError)
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/tmux.rb:69:in '_check_available'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/base.rb:59:in 'initialize'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/detected.rb:100:in 'new'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/detected.rb:100:in '_add'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/detected.rb:62:in 'block (2 levels) in detect'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/detected.rb:60:in 'each'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/detected.rb:60:in 'detect'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/detected.rb:60:in 'block in detect'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/detected.rb:59:in 'each'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier/detected.rb:59:in 'detect'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier.rb:180:in '_detect_or_add_notifiers'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier.rb:198:in '_activate'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier.rb:87:in 'initialize'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier.rb:42:in 'new'
from /usr/local/rvm/gems/ruby-2.4.1/gems/notiffany-0.1.1/lib/notiffany/notifier.rb:42:in 'connect'
from /usr/local/rvm/gems/ruby-2.4.1/gems/guard-2.13.0/lib/guard/notifier.rb:11:in 'connect'
from /usr/local/rvm/gems/ruby-2.4.1/gems/guard-2.13.0/lib/guard/notifier.rb:31:in 'notify'
from /usr/local/rvm/gems/ruby-2.4.1/gems/guard-compat-1.2.1/lib/guard/compat/plugin.rb:113:in 'notify'
from /usr/local/rvm/gems/ruby-2.4.1/gems/guard-minitest-2.4.4/lib/guard/minitest/notifier.rb:31:in 'notify'
from /usr/local/rvm/gems/ruby-2.4.1/gems/guard-minitest-2.4.4/lib/guard/minitest/reporter.rb:10:in 'report'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:791:in 'each'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:791:in 'report'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:141:in 'run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:63:in 'block in autorun'

我在 Gemfile 中没有看到任何名为 notiffany 的内容,但我发现它与 Guard 相关.由于我使用的是教程中指定的特定版本,我不确定是否要寻找更新的版本,是否有修复.

I don't see anything called notiffany in the Gemfile, but I've found it's related to Guard. Since I'm using the specific version indicated by the tutorial, I'm not sure if looking for a newer version there is the fix.

可能我只是没有搜索正确的关键字,所以如果之前有人回答过这个问题,我深表歉意.任何帮助表示赞赏.

It is possible I'm just not searching for the right keywords, so I apologize if this has been answered before. Any help is appreciated.

-杰

推荐答案

试试这个:

sudo yum install -y tmux

这个日本网站上的建议.

这篇关于railstutorial.org gems/notiffany-0.1.1/lib/notiffany/notifier/tmux/client.rb:12:in `version':未定义的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆