1

環境

ruby 1.9.2p323 (2012-05-22 revision 35755) [x86_64-darwin11.4.0]

rvm 1.16.6

gemsets for ruby-1.9.2-head 
   (default)
   global
=> rails321

痕跡

$ gem install 'debugger'
Building native extensions.  This could take a while...
Successfully installed debugger-1.2.1

$ bundle show debugger
/Users/PH/.rvm/gems/ruby-1.9.2-head@rails321/gems/debugger-1.2.1

$ irb
> require 'debugger'
LoadError: no such file to load -- trace_nums
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/PH/.rvm/gems/ruby-1.9.2-head@rails321/gems/debugger-linecache-1.1.2/lib/tracelines19.rb:3:in `<top (required)>'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/PH/.rvm/gems/ruby-1.9.2-head@rails321/gems/debugger-linecache-1.1.2/lib/linecache19.rb:65:in `<top (required)>'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/PH/.rvm/gems/ruby-1.9.2-head@rails321/gems/debugger-1.2.1/lib/ruby-debug-base.rb:2:in `<top (required)>'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/PH/.rvm/gems/ruby-1.9.2-head@rails321/gems/debugger-1.2.1/lib/ruby-debug.rb:5:in `<top (required)>'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/PH/.rvm/gems/ruby-1.9.2-head@rails321/gems/debugger-1.2.1/lib/debugger.rb:4:in `<top (required)>'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from (irb):1
    from /Users/PH/.rvm/rubies/ruby-1.9.2-head/bin/irb:16:in `<main>'
4

2 に答える 2

2

提案:

urはrvmを使用しているため、「sudogeminstalldebugger」ではなく「geminstalldebugger」を試してください。

于 2012-10-29T18:10:10.737 に答える
0

バンドラーを使用していません。

Gemfile を作成して配置する

  gem 'debugger' 

初期化。

ジェムセットを作成する

 rvm use 1.9.2
 rvm gemset create [my-app-name]
 rvm use [my-app-name] # 
 bundle

そして再テスト

于 2015-02-17T20:40:05.370 に答える