当第一次尝试在ruby 2.2.3中使用byebug时,我得到了
NameError:
undefined local variable or method `byebug'我很困惑,以下是一些诊断方法:
ruby --version
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
cat Gemfile | grep bye
gem 'byebug'
gem list | grep bye
byebug (8.2.1, 8.2.0)
#the command I'm using to run my ruby code is
rspec *spec.rb --tag focus
#also tried prepending bundle exec发布于 2015-11-26 19:44:42
把它弄清楚。我需要这句话:
require 'byebug'; byebug;在我的红宝石密码里。
发布于 2015-11-26 19:46:11
您是否在应用程序上运行bundle install (假设这是在rails应用程序的上下文中,考虑到您使用的是Gemfiles)?
编辑:你搞清楚了,我明白了:我打算建议接下来需要图书馆,但我发现我不需要这样做。
https://stackoverflow.com/questions/33945970
复制相似问题