无法安装调试器gem

时间:2014-05-20 16:41:18

标签: ruby-on-rails ruby

我无法安装debuggar gem。

我收到此错误,我没有为什么:

Building native extensions.  This could take a while...
ERROR:  Error installing debugger:
    ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-1.9.3-p547/bin/ruby extconf.rb
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
Makefile creation failed
**************************************************************************
No source for ruby-1.9.3-p547 provided with debugger-ruby_core_source gem.
**************************************************************************
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/local/rvm/rubies/ruby-1.9.3-p547/bin/ruby
    --with-ruby-dir
    --without-ruby-dir
    --with-ruby-include
    --without-ruby-include=${ruby-dir}/include
    --with-ruby-lib
    --without-ruby-lib=${ruby-dir}/lib

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p547/gems/debugger-1.5.0 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p547/extensions/x86_64-darwin-13/1.9.1/debugger-1.5.0/gem_make.out

2 个答案:

答案 0 :(得分:41)

我遇到了同样的问题,这为我解决了这个问题:

gem update debugger-ruby_core_source

然后bundle install会起作用。

答案 1 :(得分:6)

试一试:

bundle update debugger

并保留在你的gemfile中:

gem 'debugger'