gpt4 book ai didi

railstutorial.org gems/notiffany-0.1.1/lib/notiffany/notifier/tmux/client.rb :12:in `version' : undefined method

转载 作者:行者123 更新时间:2023-12-04 14:23:06 25 4
gpt4 key购买 nike

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

我还对错误进行了一些搜索,并提出了有关 tmux 的评论,但我对 Ruby on Rails 或 Cloud9 的经验不足,无法确定我在做什么。有人还建议将“捆绑执行 rake 测试”作为替代方法,但我遇到了同样的错误:

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 相关。由于我使用的是教程中指定的特定版本,我不确定是否要寻找更新的版本,是否有修复。

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

-杰

最佳答案

尝试这个:

sudo yum install -y tmux

正如 this 所建议的日本网站。

关于railstutorial.org gems/notiffany-0.1.1/lib/notiffany/notifier/tmux/client.rb :12:in `version' : undefined method,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48504534/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com