问题
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 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>'
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.
My stack looks like this:
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?
回答1:
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 hasn't been updated to work with latest Ruby or Rails, so please avoid using it at this time.
You can use Thin as alternative:
gem install eventmachine --pre
gem install thin
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.
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
来源:https://stackoverflow.com/questions/9294858/building-a-ruby-stack-on-windows-server-msvcrt-ruby18-dll