3

Windows 7 マシンで RoR をセットアップしようとするとエラーが発生します。RubyInstaller と DevKit を使用して Ruby をインストールしました。彼らの指示では、gem install rdiscount --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

この提案を試し、重複libiconv-2.dllファイルを削除しましたが、問題は解決しません。助言がありますか?

4

1 に答える 1

3

現時点では、RDiscount は Windows で壊れています。GitHub の問題 #74 を参照してください。

Ruby と DevKit をインストールしている場合は、jsonまたはのような他の gem をインストールRedClothして、適切にコンパイルされることを確認できます。

gem install json --platform=ruby
gem install RedCloth --platform=ruby

それが役立つことを願っています。

于 2013-03-06T11:36:54.570 に答える