2014-04-03 53 views
1

目前在Windows上運行,使用Ruby 1.9.3-p545和DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe。Jekyll伺服器監視錯誤 - Windows

我可以運行起到很好,但只要我去跑服手錶,我得到以下從* Windows命令提示符輸出:

C:\Ruby>jekyll serve --watch 
←[33mConfiguration file: none←[0m 
     Source: C:/Ruby 
    Destination: C:/Ruby/_site 
    Generating... done. 
Auto-regeneration: enabled 
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 
cannot load such file -- wdm (LoadError) 
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i 
n `require' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter 
.rb:207:in `load_dependent_adapter' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter 
s/windows.rb:33:in `load_dependent_adapter' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter 
.rb:198:in `usable?' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter 
s/windows.rb:25:in `usable?' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter 
.rb:190:in `usable_and_works?' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter 
.rb:57:in `block in select_and_initialize' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter 
.rb:55:in `each' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter 
.rb:55:in `select_and_initialize' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/listene 
r.rb:291:in `initialize_adapter' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/listene 
r.rb:283:in `setup' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/listene 
r.rb:52:in `start' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.5.1/lib/jekyll/command 
s/build.rb:56:in `watch' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.5.1/lib/jekyll/command 
s/build.rb:8:in `process' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.5.1/bin/jekyll:97:in ` 
block (2 levels) in <top (required)>' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.6/lib/commander/c 
ommand.rb:180:in `call' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.6/lib/commander/c 
ommand.rb:180:in `call' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.6/lib/commander/c 
ommand.rb:155:in `run' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.6/lib/commander/r 
unner.rb:422:in `run_active_command' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.6/lib/commander/r 
unner.rb:66:in `run!' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.6/lib/commander/d 
elegates.rb:12:in `run!' 
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.6/lib/commander/i 
mport.rb:10:in `block in <top (required)>' 

回答

1

需要在Windows上安裝這種寶石的能力手錶:

gem install wdm 

但是,如果你已經在你的網站的根目錄下有一個說寶石文件,然後添加此創業板:

require 'rbconfig' 
gem 'wdm', '~> 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i