Ruby DevKit问题

时间:2012-11-20 20:58:18

标签: ruby makefile devkit

我在安装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

1 个答案:

答案 0 :(得分:2)

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

我建议你看一下similar question on Stack Overflow。我和你有完全相同的问题,这个解决方案直接解决了。

相关问题