【发布时间】:2015-11-26 19:41:40
【问题描述】:
第一次尝试在 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
【问题讨论】:
-
为了方便调试,我的 rspec_helper 中有一个 require 'byebug'。