尝试在IntelliJ(11.1.5)中调试黄瓜方案时,遇到第一个断点时失败并出现以下错误。如果删除所有断点,它会成功运行。
gem list
capybara (2.0.2, 1.1.4)
cucumber (1.2.3, 1.2.1)
rspec (2.13.0)
ruby-debug-base (0.10.3.4 java)
ruby-debug-ide (0.4.17.beta9)
Testing started at 1:12 PM ...
Fast Debugger (ruby-debug-ide 0.4.17.beta9, ruby-debug-base 0.10.3.4) listens on 127.0.0.1:60409
Using the default profile...
file:/Users/user1456/.rvm/rubies/jruby-1.7.2/lib/jruby.jar!/jruby/java/java_package_module_template.rb:11 warning: `eval' should not be aliased
including Capybara::DSL in the global scope is not recommended!
/Users/user1456/.rvm/gems/jruby-1.7.2@andise-payables/gems/cucumber-1.2.3/bin/../lib/cucumber/parser/gherkin_builder.rb:120 warning: singleton on non-persistent Java type Java::JavaUtil::ArrayList (http://wiki.jruby.org/Persistence)
Tags: @@ITPAY-433, @@sai
Given I have connected to 'chartofaccounts' collection # step_definitions/api/chartofaccounts.rb:4
Then the total count of 'COA' records should be '38' # step_definitions/api/chartofaccounts.rb:20
When I search for '<brand_id>' / '<market_id>' / '<chnl_id>' in 'COA' # step_definitions/api/chartofaccounts.rb:12
Then the 'fcCoa' string recorded should be '<fc_coa>' # step_definitions/api/chartofaccounts.rb:24
And the 'nfcCoa' string recorded should be '<nfc_coa>' # step_definitions/api/chartofaccounts.rb:24
And the 'nfcCoaExtAgentCommisison' string recorded should be '<nfc_ext_agcm_coa>' # step_definitions/api/chartofaccounts.rb:24
Java::JavaLang::NoSuchMethodError: org.jruby.runtime.DynamicScope.getEvalScope()Lorg/jruby/runtime/DynamicScope;
org.jruby.debug.Context.contextCopyLocals(Context.java:407)
org.jruby.debug.Context.frame_locals(Context.java:284)
org.jruby.debug.Context$INVOKER$i$1$0$frame_locals_DBG.call(Context$INVOKER$i$1$0$frame_locals_DBG.gen)
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:331)
Skipped step
Skipped step
1 scenario (1 failed)
6 steps (1 failed, 2 skipped, 3 passed)
0m0.553s
Process finished with exit code 1
答案 0 :(得分:1)
您的调试宝石已旧,使用以下内容进行更新:
gem install ruby-debug-base --pre
gem install ruby-debug-ide --pre