Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby DevKit问题_Ruby_Makefile_Devkit - Fatal编程技术网

Ruby DevKit问题

Ruby DevKit问题,ruby,makefile,devkit,Ruby,Makefile,Devkit,我在安装DevKit时遇到了一些问题。基本上,它不起作用。我已通过安装,但安装未通过测试: 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

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

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
也没有用。那里一切都很好

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
没有错误

我的操作系统是Windows7x64!系统上没有安装其他版本的Ruby或DevKit,这是路径

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

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


我建议你去看一本书。我遇到了与您完全相同的问题,此解决方案立即解决了问题。

您能否尝试将其安装在没有空格的文件夹中?我记得它解决了我过去的一些问题。不起作用:(同样的错误也改变了路径。其他书籍没有提到将devkit添加到您的路径。我建议删除该路径,请仔细阅读并重试。请不要发布贬损性的答案。我添加该路径是因为它是在rubyinstaller google组的某个地方被推荐的。但是,在我的情况下,添加或删除这些工具都是错误。)来自路径的元素不会产生不同的结果。谢谢你!解决了这个问题。我重新安装了ruby w/o spaces,现在一切正常。