在运行Ruby 1.9.2的Snow Leopard上安装ruby-debug-ide


0

我正在尝试在运行Ruby 1.9的Snow Leopard上安装ruby-debug-ide,以便我可以在Netbeans中调试ruby代码。

我使用以下命令

sudo gem install ruby-debug-ide19

但是我一直收到以下错误:

nathan:mark-moseley-ruby-debug-ide-9eb626b nathan$ sudo gem install ruby-debug-ide19

构建原生扩展。这可能需要一段时间...错误:安装ruby-debug-ide19时出错:错误:无法构建gem本机扩展。

/Users/nathan/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.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=/Users/nathan/.rvm/rubies/ruby-1.9.2-head/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
/Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:268:in `block (2 levels) in read': Looking for http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p160.tar.gz and all I got was a 404! (URI::NotFoundError)
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1194:in `block in transport_request'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:2342:in `reading_body'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1193:in `transport_request'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1177:in `request'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1170:in `block in request'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:627:in `start'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1168:in `request'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:239:in `block in read'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:286:in `connect'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:234:in `read'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:128:in `download'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/tempfile.rb:320:in `open'
 from /Users/nathan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/ruby_core_source.rb:51:in `create_makefile_with_core'
 from extconf.rb:20:in `<main>'
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p160.tar.gz


Gem files will remain installed in /Users/nathan/.rvm/gems/ruby-1.9.2-head/gems/linecache19-0.5.11 for inspection.
Results logged to /Users/nathan/.rvm/gems/ruby-1.9.2-head/gems/linecache19-0.5.11/ext/trace_nums/gem_make.out

有谁知道如何安装它?

注意我安装了最新的xcode但是我使用RVM安装了Ruby 1.9,我也习惯将它设置为默认的ruby环境。

Answers:


0

通过使用自制软件(brew install ruby​​)安装Ruby来解决这个问题。似乎RVM安装的版本有一些问题(我经历了与各种宝石相同的事情)。

在用homebrew安装Ruby之后我不得不手动修改符号链接,因为默认情况下你的系统仍然会使用带有xcode的Ruby 1.8。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.