在Windows 7上安装瘦的问题 [英] Problems in installing thin on windows 7

查看:89
本文介绍了在Windows 7上安装瘦的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Ruby新手。我正在尝试安装一块红宝石宝石。它显示安装宝石的错误。我搜索了错误,但我找不到解决我的问题的链接。



错误是:

  C:\Users\\\
ame\Desktop> ruby​​ -v
ruby​​ 2.0.0p247(2013-06-27)[i386-mingw32]

C:\Users\\\
ame\Desktop> gem -v
2.0.3

C:\ Users \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $ b临时增强PATH以包含DevKit ...
构建本机扩展。这可能需要一段时间...
错误:安装thin时出错:
错误:无法构建gem本机扩展。

C:/Ruby200/bin/ruby.exe extconf.rb
在-lc中检查main()... *** extconf.rb失败***
由于某种原因无法创建Makefile,可能缺少必要的
库和/或头文件。检查mkmf.log文件以获取更多详细信息。您可能
需要配置选项。

提供的配置选项:
--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:在`try_do ':编译器无法生成可执行文件。 (RuntimeError)
您必须先安装开发工具。从C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:515:在`try_link0'
从C:/Ruby200/lib/ruby/2.0.0/mkmf.rb: 530:在C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:716的`try_link'
中:在C:/Ruby200/lib/ruby/2.0的`try_func'
中。 0 / mkmf.rb:946:在`block in have_library'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:891:在`block in checking_for'
from C :/Ruby200/lib/ruby/2.0.0/mkmf.rb:336:在`block(2 levels)'中推迟'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb: 306:在`open'中
从C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:336:在`block in block'
从C:/ Ruby200 / lib / ruby​​ / 2.0.0 / mkmf.rb:306:在`open'中
从C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:332:在`推迟'
从C:/ Ruby200 / lib / ruby​​ / 2.0.0 / mkmf.rb:890:在`checking_for'
中从C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:941:在`have_library'$ b $ extconf.rb :4:在`< main>'


Gem文件将保持安装在C:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.0进行检查。
记录到C的结果:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.0/ext/thin_parser/gem_make.out

C:\ Users \\\
ame\Desktop>

真正感谢您的任何帮助。谢谢。

解决方案

我按照以下步骤解决了问题。发布这个答案,因为它可能对其他人有用。



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

安装了ruby和devkit。使用此链接中提供的说明安装devkit https://github.com/oneclick/rubyinstaller/ wiki / Development-Kit

cd到ruby文件夹和已安装的rails,thin gem


I am new to ruby. I am trying to install a ruby gem thin. It shows an error in installing the gem. I googled for the error but i could not find a link that addresses my problem.

The error is:

    C:\Users\name\Desktop>ruby -v
    ruby 2.0.0p247 (2013-06-27) [i386-mingw32]

    C:\Users\name\Desktop>gem -v
    2.0.3

    C:\Users\name\Desktop>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:\Users\name\Desktop>

Any help truly appreciated. Thanks.

解决方案

I resolved the problem by following these steps. Posting this answer as it might be useful for others.

I uninstalled and deleted all the ruby stuff and restarted the machine. Downloaded Ruby 2.0 and Devkit from here http://rubyinstaller.org/downloads/.

Installed ruby and devkit. Install devkit using the instructions given in this link https://github.com/oneclick/rubyinstaller/wiki/Development-Kit.

cd to ruby folder and installed rails, thin gem

这篇关于在Windows 7上安装瘦的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆