在 Windows 7 上安装瘦的问题



我是红宝石的新手。我正在尝试安装红宝石薄。它显示安装 gem 时出错。我在谷歌上搜索了错误,但找不到解决我问题的链接。

错误是:

    C:UsersnameDesktop>ruby -v
    ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
    C:UsersnameDesktop>gem -v
    2.0.3
    C:UsersnameDesktop>gem install thin
    Temporarily enhancing PATH to include DevKit...
    Building native extensions.  This could take a while...
    ERROR:  Error installing thin:
            ERROR: Failed to build gem native extension.
        C:/Ruby200/bin/ruby.exe extconf.rb
    checking for main() in -lc... *** 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/bin/ruby
            --with-thin_parser-dir
            --without-thin_parser-dir
            --with-thin_parser-include
            --without-thin_parser-include=${thin_parser-dir}/include
            --with-thin_parser-lib
            --without-thin_parser-lib=${thin_parser-dir}/
            --with-clib
            --without-clib
    C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
    You have to install development tools first.
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:515:in `try_link0'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:530:in `try_link'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:716:in `try_func'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:946:in `block in have_library'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:891:in `block in checking_for'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:336:in `block (2 levels) in postpone'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:306:in `open'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:336:in `block in postpone'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:306:in `open'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:332:in `postpone'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:890:in `checking_for'
            from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:941:in `have_library'
            from extconf.rb:4:in `<main>'

    Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.0 for inspection.
    Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.0/ext/thin_parser/gem_make.out
    C:UsersnameDesktop>

任何帮助真的非常感谢。谢谢。

我按照以下步骤

解决了问题。发布此答案,因为它可能对其他人有用。

我卸载并删除了所有 ruby 内容并重新启动了机器。从这里下载了Ruby 2.0和Devkit http://rubyinstaller.org/downloads/。

安装了 ruby 和 devkit。按照此链接 https://github.com/oneclick/rubyinstaller/wiki/Development-Kit 中给出的说明安装 devkit。

CD到Ruby文件夹和安装的导轨,薄宝石

相关内容

  • 没有找到相关文章

最新更新