2012-09-04 107 views
1

我收到以下错误在安装Ruby调试Ruby调试安装错误

在Gemfile中我加入

gem 'ruby-debug19', :require => 'ruby-debug' 

和运行

bundle install 

Installing linecache19 (0.5.12) with native extensions 
    Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 
    /usr/local/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=/usr/local/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 

什么是错误

原因

如何安装三维调试器..?

回答

2

您必须先将设置为您环境中DevKit的路径变量

然后运行

gem install linecache19 
gem install ruby-debug-base19 
gem install ruby-debug-ide 

通过命令提示符

可能这项工作

+1

这工作很好... –

1

“在Ubuntu上,本地编译步骤会下载ruby 1.9.2源文件并尝试将其解压缩到您当前的用户可能没有写访问权限的目录中。” - Darren(参考:http://isitruby19.com/linecache19

在这种情况下,请尝试sudo bundle install


如果问题是,它无法解决vm_core.h文件相关性,可以运行特定版本的安装和路径红宝石源:

sudo -E gem install linecache19 -v=0.5.11 -- --with-ruby-include=path_to/ruby-1.9.1-p378/ 
sudo -E gem install ruby-debug-base19 -v=0.11.23 -- --with-ruby-include=path_to/ruby-1.9.1-p378/ 
sudo -E gem install ruby-debug-ide -v=0.4.9 -- --with-ruby-include=path_to/ruby-1.9.1-p378/ 

参考:http://isitruby19.com/linecache19

请注意,请将path_to/ruby-1.9.1-p378/替换为安装红宝石的路径。

要找出你安装了Ruby,尝试运行:

which ruby 
+0

仍然有错误 –

+0

你有超级用户权限安装?例如。当你'捆绑',尝试'sudo捆绑' – ronalchn

+0

是的红宝石调试IDE使用正确的时候--pre –

1

从RVM网站:

如果您在安装红宝石debug19尝试使用以下命令安装麻烦:

$ rvm reinstall 1.9.3 --patch debug --force-autoconf 
$ gem install ruby-debug19 -- --with-ruby-include="${MY_RUBY_HOME/rubies/src}" 
+0

我使用的是Windows .. –

+0

所以没有Windows上的RVM我猜? – Abram

+0

然后我建议遵循下面的答案。看起来不错。 – Abram