所以我试图在ubuntu盒子上安装ruby-debug19 gem。我知道其中两个依赖项是linecache19和ruby-debug-19,并且rubygems上的版本还没有与最新版本的ruby兼容。
我发现了这个要点https://gist.github.com/1333785,它描述了我需要做什么,而且我已经使用RVM在我的本地计算机上工作了。但是,在这个盒子里我从源代码编译ruby并且没有使用RVM。
我试图像这样安装宝石
gem install linecache19-0.5.13.gem ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/usr/local/bin/ruby-1.9.3-p125/include
但是由于下面的错误而失败了。我注意到RVM中的include目录与我的linux框中的include目录有很大的不同......
gem install linecache19-0.5.13.gem ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/usr/local/bin/ruby-1.9.3-p125/include
Building native extensions. This could take a while...
Successfully installed linecache19-0.5.13
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-base19-0.11.26.gem:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby-1.9.3-p125/bin/ruby extconf.rb --with-ruby-include=/usr/local/bin/ruby-1.9.3-p125/include
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
*** 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
--without-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/bin/ruby-1.9.3-p125/bin/ruby
--with-ruby-dir
--without-ruby-dir
--with-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
extconf.rb:16:in `block in <main>': break from proc-closure (LocalJumpError)
from /usr/local/bin/ruby-1.9.3-p125/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `call'
from /usr/local/bin/ruby-1.9.3-p125/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `create_makefile_with_core'
from extconf.rb:32:in `<main>'