【问题标题】:Ruby DevKit problemsRuby DevKit 问题
【发布时间】:2012-11-20 20:58:18
【问题描述】:

我在安装 DevKit 时遇到了一些问题。基本上,它不起作用。我已经通过books 安装了它,但安装未通过测试:

gem install rdiscount --platform=ruby

返回以下错误:

C:\Ruby 1.9.3-p327\DevKit>gem install rdiscount --platform=ruby
Building native extensions.  This could take a while...
ERROR:  Error installing rdiscount:
        ERROR: Failed to build gem native extension.

        "C:/Ruby 1.9.3-p327/bin/ruby.exe" extconf.rb
checking for random()... no
checking for srandom()... no
checking for rand()... yes
checking for srand()... yes
creating Makefile

make
Makefile:219: *** multiple target patterns.  Stop.


Gem files will remain installed in C:/Ruby 1.9.3-p327/lib/ruby/gems/1.9.1/gems/r
discount-1.6.8 for inspection.
Results logged to C:/Ruby 1.9.3-p327/lib/ruby/gems/1.9.1/gems/rdiscount-1.6.8/ex
t/gem_make.out

另外this 也没用。那里一切都很好。

gem_make.out 包含以下内容:

"C:/Ruby 1.9.3-p327/bin/ruby.exe" extconf.rb
checking for random()... no
checking for srandom()... no
checking for rand()... yes
checking for srand()... yes
creating Makefile

make
Makefile:219: *** multiple target patterns.  Stop.

在这一点上,我快疯了。我尝试只运行 extconf.rb

C:\Ruby 1.9.3-p327\lib\ruby\gems\1.9.1\gems\rdiscount-1.6.8\ext>ruby extconf.rb
checking for random()... no
checking for srandom()... no
checking for rand()... yes
checking for srand()... yes
creating Makefile

没有错误!

我的操作系统是 windows 7 x64!系统上没有安装其他版本的 Ruby 或 DevKit,这是 PATH

PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Ruby 1.9.3-p327\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\pik;C:\Ruby 1.9.3-p327\DevKit\bin;C:\Ruby 1.9.3-p327\DevKit\mingw\bin

【问题讨论】:

  • 你可以尝试将它安装在没有空格的文件夹中吗?我记得它解决了我过去的一些问题。
  • 不工作:(同样的错误也改变了路径
  • 这些书没有提到将 devkit 添加到您的路径中。我建议删除它,仔细阅读并重试。
  • 请不要发布贬低的答案。我已经添加了路径,因为它被推荐在 ruby​​installer google 组的某个地方。但是,在我的情况下,从 PATH 中添加或删除这些元素不会产生不同的结果。

标签: ruby makefile devkit


【解决方案1】:

我可能错了,但我认为 Ruby 安装路径被解读为两个不同的参数,实际上是 "C:/Ruby" "1.9.3-p327/bin/ruby.exe",因为路径没有被转义(这是正确的词吗?基本上用引号括起来)。

我建议你看看similar question on Stack Overflow。我遇到了和你一模一样的问题,这个解决方案直接解决了。

【讨论】:

  • 谢谢你!解决了这个问题。我重新安装了没有空格的 ruby​​,现在一切正常。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-22
  • 1970-01-01
相关资源
最近更新 更多