Can';在Windows上安装RubyInstaller和DevKit后,请不要安装RDisunt gem
我试图在Windows 7计算机上设置RoR时出错。我用RubyInstaller和DevKit安装了Ruby。按照他们的指示,它要求执行Can';在Windows上安装RubyInstaller和DevKit后,请不要安装RDisunt gem,ruby,rubygems,Ruby,Rubygems,我试图在Windows 7计算机上设置RoR时出错。我用RubyInstaller和DevKit安装了Ruby。按照他们的指示,它要求执行gem install rdisont--platform=ruby,以确保安装正确。我得到以下错误: C:\Windows\system32>cd ../../DevKit C:\DevKit>gem install rdiscount --platform=ruby Temporarily enhancing PATH to include
gem install rdisont--platform=ruby
,以确保安装正确。我得到以下错误:
C:\Windows\system32>cd ../../DevKit
C:\DevKit>gem install rdiscount --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rdiscount:
ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for random()... *** 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:/Ruby200-x64/bin/ruby
--with-rdiscount-dir
--without-rdiscount-dir
--with-rdiscount-include
--without-rdiscount-include=${rdiscount-dir}/include
--with-rdiscount-lib
--without-rdiscount-lib=${rdiscount-dir}/
C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:431:in `try_do': The compiler failed to ge
nerate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:516:in `try_link0'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:531:in `try_link'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:717:in `try_func'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1001:in `block in have_func'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:892:in `block in checking_for
'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:337:in `block (2 levels) in p
ostpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:307:in `open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:337:in `block in postpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:307:in `open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:333:in `postpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:891:in `checking_for'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1000:in `have_func'
from extconf.rb:5:in `<main>'
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rdisc
ount-2.0.7.1 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rdiscount-2.0.7.1/ext/
gem_make.out
C:\Windows\system32>cd.././DevKit
C:\DevKit>gem安装rdisont--platform=ruby
暂时增强包含DevKit的路径。。。
构建本机扩展。这可能需要一段时间。。。
错误:安装RDisont时出错:
错误:无法生成gem本机扩展。
C:/Ruby200-x64/bin/ruby.exe extconf.rb
正在检查random()…***extconf.rb失败***
由于某些原因无法创建Makefile,可能缺少必要的
库和/或标题。有关详细信息,请查看mkmf.log文件。你可以
需要配置选项。
提供的配置选项:
--使用opt dir
--不带opt dir
--选择包含
--不带opt include=${opt dir}/include
--使用opt lib
--不带opt lib=${opt dir}/lib
--用make prog
--没有make prog
--srcdir=。
--库尔迪尔
--ruby=C:/Ruby200-x64/bin/ruby
--与rdisont dir
--没有侦察机
--包括
--不带RDisont include=${RDisont dir}/include
--使用RDisont lib
--不带RDisont lib=${RDisont dir}/
C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:431:in'try_do':编译器未能将
生成一个可执行文件。(运行时错误)
您必须首先安装开发工具。
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:516:in'try_link0'
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:531:in'try_link'
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:717:in'try_func'
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1001:in`block in have_func'
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:892:in`block in checking_
'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:337:in`block(2层)in`p
ostpone'
从C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:307:in'open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:337:in'block in delay'
从C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:307:in'open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:333:in“推迟”
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:891:in'checking_'
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1000:in'have_func'
来自extconf.rb:5:in`'
Gem文件仍将安装在C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rdisc中
用于检查的UNT-2.0.7.1。
结果记录到C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rdisont-2.0.7.1/ext/
珠宝店
我已经尝试并删除了一个重复的
libiconv-2.dll
文件,但问题仍然存在。有什么建议吗?此时,Windows上的RDiscont已损坏,请参阅
如果您已经安装了Ruby和DevKit,那么您可以安装其他gem,如json
或RedCloth
,以验证它是否正确编译:
gem install json --platform=ruby
gem install RedCloth --platform=ruby
希望有帮助