エラーになる場合
$ gem install ruby-debug
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.
/Users/kohgami/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb
Can't handle 1.9.x yet
*** 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=/Users/kohgami/.rvm/rubies/ruby-1.9.3-p362/bin/ruby
Gem files will remain installed in /Users/kohgami/.rvm/gems/ruby-1.9.3-p362/gems/linecache-0.46 for inspection.
Results logged to /Users/kohgami/.rvm/gems/ruby-1.9.3-p362/gems/linecache-0.46/ext/gem_make.out
エラーになった場合は、指定を変えてあげる。
$ gem install ruby-debug19
Fetching: archive-tar-minitar-0.5.2.gem (100%)
Fetching: ruby_core_source-0.1.5.gem (100%)
Fetching: linecache19-0.5.12.gem (100%)
Building native extensions. This could take a while...
Fetching: ruby-debug-base19-0.11.25.gem (100%)
Building native extensions. This could take a while...
Fetching: ruby-debug19-0.11.6.gem (100%)
Successfully installed archive-tar-minitar-0.5.2
Successfully installed ruby_core_source-0.1.5
Successfully installed linecache19-0.5.12
Successfully installed ruby-debug-base19-0.11.25
Successfully installed ruby-debug19-0.11.6
5 gems installed
Installing ri documentation for archive-tar-minitar-0.5.2...
Installing ri documentation for ruby_core_source-0.1.5...
Installing ri documentation for linecache19-0.5.12...
Installing ri documentation for ruby-debug-base19-0.11.25...
Installing ri documentation for ruby-debug19-0.11.6...
Installing RDoc documentation for archive-tar-minitar-0.5.2...
Installing RDoc documentation for ruby_core_source-0.1.5...
Installing RDoc documentation for linecache19-0.5.12...
Installing RDoc documentation for ruby-debug-base19-0.11.25...
Installing RDoc documentation for ruby-debug19-0.11.6...
成功。
追記。
rvmに対してgem ファイルからインストール
gem install /tmp/ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/usr/local/rvm/rubies/ruby-1.9.3-p392/include/ruby-1.9.1/ruby-1.9.3-p392/