在Windows Server上构建Ruby堆栈:msvcrt-ruby18.dll [英] Building a Ruby stack on Windows Server: msvcrt-ruby18.dll

查看:122
本文介绍了在Windows Server上构建Ruby堆栈:msvcrt-ruby18.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行mongrel_rails,但是得到以下信息:

I'm attempting to run mongrel_rails, but I get the following:

    the program can't start because msvcrt-ruby18.dll is missing from your computer

Ruby然后给了我以下内容:

Ruby then gives me the following:

    C:\Users\Administrator>mongrel_rails
    C:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 126: The s
    pecified module could not be found.   - C:/Ruby193/lib/ruby/gems/1.9.1/gems/mong
    rel-1.1.5-x86-mingw32/lib/http11.so (LoadError)
            from C:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require
    '
            from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mingw32/lib/m
    ongrel.rb:12:in `<top (required)>'
            from C:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require
    '
            from C:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require
    '
            from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mingw32/bin/m
    ongrel_rails:11:in `<top (required)>'
            from C:/Ruby193/bin/mongrel_rails:19:in `load'
            from C:/Ruby193/bin/mongrel_rails:19:in `<main>'

我尝试卸载json并使用--version = ruby​​重新安装无济于事.我还尝试使用mongrel --pre,这会导致不同的错误集:

I've tried to uninstall json and reinstall with --version=ruby to no avail. I've also tried using mongrel --pre, which results in a different set of errors:

    NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be remove
    d on or after 2011-11-01.
    Gem::SourceIndex#each called from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gem_plugin
    -0.2.3/lib/gem_plugin.rb:112.
    !!! Path to log file not valid: log/mongrel.log
    mongrel::start reported an error. Use mongrel_rails mongrel::start -h to get hel
    p.

我的堆栈如下所示:

    Ruby 1.9.3p0
    Windows Server 2008 R2

    *** LOCAL GEMS ***

    actionmailer (3.2.1)
    actionpack (3.2.1)
    activemodel (3.2.1)
    activerecord (3.2.1)
    activeresource (3.2.1)
    activesupport (3.2.1)
    arel (3.0.0)
    bigdecimal (1.1.0)
    builder (3.0.0)
    bundler (1.0.22)
    cgi_multipart_eof_fix (2.5.0)
    coffee-rails (3.2.2)
    coffee-script (2.2.0)
    coffee-script-source (1.2.0)
    columnize (0.3.6)
    daemons (1.1.8)
    erubis (2.7.0)
    execjs (1.3.0)
    fastthread (1.0.7)
    gem_plugin (0.2.3)
    hike (1.2.1)
    i18n (0.6.0)
    io-console (0.3)
    journey (1.0.1)
    jquery-rails (2.0.0)
    json (1.6.5)
    mail (2.4.1)
    mime-types (1.17.2)
    minitest (2.5.1)
    mongrel (1.2.0.pre2 x86-mingw32)
    mongrel_service (0.4.0)
    multi_json (1.0.4)
    polyglot (0.3.3)
    rack (1.4.1)
    rack-cache (1.1)
    rack-ssl (1.3.2)
    rack-test (0.6.1)
    rails (3.2.1)
    railties (3.2.1)
    rake (0.9.2.2)
    rdiscount (1.6.8)
    rdoc (3.12, 3.9.4)
    sass (3.1.15)
    sass-rails (3.2.4)
    sprockets (2.3.1, 2.1.2)
    sqlite3 (1.3.5 x86-mingw32)
    thor (0.14.6)
    tilt (1.3.3)
    treetop (1.4.10)
    tzinfo (0.3.31)
    uglifier (1.2.3)

有人曾经遇到过这个吗?

Has anyone ever encountered this before?

推荐答案

似乎当mongrel二进制文件仅适用于Ruby 1.8.x时,您正在尝试在Ruby 1.9.3上为Mongrel安装二进制文件.

Seems you're trying to install binary gems for Mongrel on Ruby 1.9.3 when mongrel binaries only work for Ruby 1.8.x

Mongrel尚未更新为可与最新的Ruby或Rails一起使用,因此请避免此时使用它.

Mongrel hasn't been updated to work with latest Ruby or Rails, so please avoid using it at this time.

您可以使用Thin作为替代:

You can use Thin as alternative:

gem install eventmachine --pre
gem install thin

必须预先安装eventmachine预发行版本,因为最新的稳定版0.12不适用于Windows上的Ruby 1.9.x.

The pre-installation of eventmachine pre-release version is required since latest stable 0.12 does not work with Ruby 1.9.x on Windows.

此外,如果您使用的是Windows Server版本,请确保将Ruby可执行文件(ruby.exe)添加到DEP排除列表中:

Also, if you're using a version of Windows Server, please ensure Ruby executable (ruby.exe) is added to the DEP exclusion list:

https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting# wiki-dep_segfault

这篇关于在Windows Server上构建Ruby堆栈:msvcrt-ruby18.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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