2012-02-15 84 views
1

我試圖運行mongrel_rails,但我得到以下幾點:建立一個Ruby堆棧在Windows Server:MSVCRT-ruby18.dll

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

紅寶石,然後給了我下面的:

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​​重新安裝無效。我也試過用雜種 - 事先,導致一組不同的錯誤:

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) 

有沒有人遇到過嗎?

回答

3

好像你試圖關於Ruby 1.9.3的雜種安裝二進制寶石時雜種二進制文件的Ruby 1.8.x的

雜種尚未更新與最新的Ruby或Rails的工作只是工作,所以請避免在此時使用它。

可以使用薄紙作爲替代:

gem install eventmachine --pre 
gem install thin 

的EventMachine的預發佈版本預安裝,因爲最新的穩定0.12不與Windows的Ruby 1.9.x的工作是必需的。

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

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

+0

非常感謝路易斯,這是非常有益的。關到瘦我去! – SB2055 2012-02-16 14:31:23