2

今日まで問題なくコードをデバッグできました。これに影響を与えた可能性のある変更内容はわかりませんが、今では私の

require "ruby-debug" 

私の env.rb では、機能を実行しようとすると次のようになります...

    cannot load such file -- irb/init (LoadError)
    /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
    /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
    /usr/lib/ruby/1.9.1/irb.rb:13:in `<top (required)>'
    /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
    /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
    /usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/commands/irb.rb:1:in `<top (required)>'
    /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
    /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
    /usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/command.rb:51:in `block in load_commands'
    /usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/command.rb:50:in `each'
    /usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/command.rb:50:in `load_commands'
    /usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/command.rb:210:in `<module:Debugger>'
    /usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/command.rb:5:in `<top (required)>'
    /usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:2:in `require_relative'
    /usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:2:in `<top (required)>'
    /usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:6:in `require_relative'
    /usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:6:in `<top (required)>'
    /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require'
    /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
    /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require'
    /cygdrive/c/zap2it.com_acceptance_tests/features/support/env.rb:10:in `<top (required)>'
    /usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/rb_support/rb_language.rb:137:in `load'
    /usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/rb_support/rb_language.rb:137:in `load_code_file'
    /usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:180:in `load_file'

/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:82:in `each'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime.rb:182:in `load_step_definitions'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime.rb:41:in `run!'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/cli/main.rb:43:in `execute!'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/cli/main.rb:20:in `execute'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/bin/cucumber:14:in `<top (required)>'
/usr/bin/cucumber:23:in `load'
/usr/bin/cucumber:23:in `<main>'

それを削除すると、すべて正常に動作しますが、まだデバッグ機能がありません。

これを引き起こしている可能性のあるアイデアはありますか?

そのため、数週間後、まだこの問題が発生しています。すべての宝石をアンインストールして再インストールし、ruby-debug19、ruby-debug-base19、およびデバッガーを試しました。env ファイルで「debugger」または「ruby-debug」を要求しようとしましたが、それでも同じエラーが発生します。別の必要なライブラリが不足している可能性がありますか?

GemFile.lock は次のとおりです。

GEM
  remote: https://rubygems.org/
  specs:
    archive-tar-minitar (0.5.2)
    builder (3.2.0)
    capybara (2.1.0)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    childprocess (0.3.9)
      ffi (~> 1.0, >= 1.0.11)
    columnize (0.3.6)
    commonwatir (4.0.0)
    cucumber (1.2.3)
      builder (>= 2.1.2)
      diff-lcs (>= 1.1.3)
      gherkin (~> 2.11.6)
      multi_json (~> 1.3)
    diff-lcs (1.2.1)
    ffi (1.5.0)
    gherkin (2.11.6)
      json (>= 1.7.6)
    httpclient (2.3.2)
    json (1.7.7)
    linecache19 (0.5.12)
      ruby_core_source (>= 0.1.4)
    mime-types (1.23)
    multi_json (1.7.1)
    nokogiri (1.5.9)
    rack (1.5.2)
    rack-test (0.6.2)
      rack (>= 1.0)
    rake (10.0.3)
    rspec (2.13.0)
      rspec-core (~> 2.13.0)
      rspec-expectations (~> 2.13.0)
      rspec-mocks (~> 2.13.0)
    rspec-core (2.13.1)
    rspec-expectations (2.13.0)
      diff-lcs (>= 1.1.3, < 2.0)
    rspec-mocks (2.13.0)
    ruby-debug-base19 (0.11.25)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby_core_source (>= 0.1.4)
    ruby-debug19 (0.11.6)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby-debug-base19 (>= 0.11.19)
    ruby_core_source (0.1.5)
      archive-tar-minitar (>= 0.5.2)
    rubyzip (0.9.9)
    selenium-webdriver (2.31.0)
      childprocess (>= 0.2.5)
      multi_json (~> 1.0)
      rubyzip
      websocket (~> 1.0.4)
    watir (4.0.2)
      commonwatir (~> 4)
      watir-webdriver
    watir-webdriver (0.6.2)
      selenium-webdriver (>= 2.18.0)
    websocket (1.0.7)
    xpath (2.0.0)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  capybara
  cucumber
  httpclient
  nokogiri
  rake
  rspec
  ruby-debug19
  selenium-webdriver
  watir
  watir-webdriver

そしてGemFile:

source 'https://rubygems.org'

gem 'rake'
gem 'nokogiri'
gem 'httpclient'

group :test do
  gem 'rspec'
  gem 'cucumber'
  gem 'watir'
  gem 'watir-webdriver'
  gem 'selenium-webdriver'
  gem 'capybara'
end
4

2 に答える 2