无法在 Windows 上安装 ruby-debug gem
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1972494/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot install ruby-debug gem on Windows
提问by JZ.
I'm having trouble installing the Ruby-Debug Gem on windows. What does this error mean? How can I fix this? Thanks
我在 Windows 上安装 Ruby-Debug Gem 时遇到问题。这个错误是什么意思?我怎样才能解决这个问题?谢谢
C:\Users\Steve>gem install ruby-debug
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.
C:/Ruby19/bin/ruby.exe 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
--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=C:/Ruby19/bin/ruby
Gem files will remain installed in C:/Ruby19/lib/ruby/gems/1.9.1/gems/linecache-
0.43 for inspection.
Results logged to C:/Ruby19/lib/ruby/gems/1.9.1/gems/linecache-0.43/ext/gem_make
.out
I have the following Gems:
我有以下宝石:
actionpack (2.3.5, 2.3.3)
activerecord (2.3.5, 2.3.3)
activeresource (2.3.5, 2.3.3)
activesupport (2.3.5, 2.3.3)
columnize (0.3.1)
json_pure (1.2.0)
rack (1.0.1)
rails (2.3.5, 2.3.3)
rake (0.8.7)
rmagick (1.14.1)
rubyforge (2.0.3)
rubygems-update (1.3.5)
sqlite3-ruby (1.2.5)
with rails version 3.3.5
回答by AMIC MING
Execute Below command and its works
执行下面的命令及其工作
C:\Users\Steve>gem install ruby-debug --platform=mswin32
C:\Users\Steve>gem install ruby-debug --platform=mswin32
回答by Harish Shetty
I ran into the same problem. Following steps should get you through:
我遇到了同样的问题。以下步骤应该可以帮助您完成:
- Install ruby using RubyInstaller
- Install devkit
Install ruby-debug19instead of ruby-debug.
gem install ruby-debug19
- 使用RubyInstaller安装 ruby
- 安装开发包
安装ruby-debug19而不是ruby-debug。
gem 安装 ruby-debug19
回答by cmpolis
回答by Rainer
this port of ruby-debug that works on 1.9.2 and 1.9.3worked for me. Just type
这个 适用于 1.9.2 和 1.9.3 的 ruby-debug 端口对我有用。只需输入
gem install debugger
回答by Spob
I found this answer worked easiest for me: http://github.com/oneclick/rubyinstaller/wiki/development-kit
我发现这个答案对我来说最简单:http: //github.com/oneclick/rubyinstaller/wiki/development-kit
回答by Luis Lavena
The error seems clear:
错误似乎很清楚:
Can't handle 1.9.x yet
*** extconf.rb failed ***
You're trying to install ruby-debug gem, which is compatible onlywith Ruby 1.8.x on Ruby 1.9.x
您正在尝试安装 ruby-debug gem,它仅与 Ruby 1.9.x 上的 Ruby 1.8.x兼容
Please install ruby-debug19, which is compatible with Ruby 1.9.x
请安装 ruby-debug19,它与 Ruby 1.9.x 兼容
gem install ruby-debug19
回答by Alexander Shlenchack
Also you can try this:
你也可以试试这个:
gem install ruby-debug-ide --platform=ruby --pre