2013-12-11 13 views
6

Sto usando Jekyll su Windows 8 per lavorare su un piccolo progetto per lavoro. Finora amo Jekyll, ma ho riscontrato un problema durante il tentativo di pubblicare il mio sito con il flag --watch, che consente all'aggiornamento del sito di aggiornarsi quando vengono apportate modifiche al codice.Uso di jekyll con flag --watch che causa errori di compilazione

Quando eseguo i miei siti Jekyll, apro il mio cmd e cd nella directory corretta. Per i documenti Jekyll, eseguirò chcp 65001 nella directory per cambiare la codifica in UTF-8. Ora, quando corro jekyll serve -w o jekyll serve --watch ottengo un dump di errore che consiste delle seguenti operazioni:

C:\Dropbox\Workbench\lunch-and-learn>jekyll serve -w 
    Configuration file: C:/Dropbox/Workbench/lunch-and-learn/_config.yml 
       Source: C:/Dropbox/Workbench/lunch-and-learn 
      Destination: C:/Dropbox/Workbench/lunch-and-learn/_site 
      Generating... done. 
    Auto-regeneration: enabled 
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': cannot load such file -- wdm (LoadError) 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter.rb:207:in `load_dependent_adapter' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapters/windows.rb:33:in `load_dependent_adapter' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter.rb:198:in `usable?' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapters/windows.rb:25:in `usable?' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter.rb:190:in `usable_and_works?' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter.rb:57:in `block in select_and_initialize' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter.rb:55:in `each' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/adapter.rb:55:in `select_and_initialize' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/listener.rb:291:in `initialize_adapter' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/listener.rb:283:in `setup' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.1/lib/listen/listener.rb:52:in `start' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/jekyll-1.4.1/lib/jekyll/commands/build.rb:56:in `watch' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/jekyll-1.4.1/lib/jekyll/commands/build.rb:8:in `process' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/jekyll-1.4.1/bin/jekyll:97:in `block (2 levels) in <top (required)>' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/command.rb:180:in `call' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/command.rb:180:in `call' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/command.rb:155:in `run' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/runner.rb:402:in `run_active_command' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/runner.rb:66:in `run!' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/delegates.rb:11:in `run!' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in <top (required)>' 

Vale la pena notare che quando ho eseguito il sito con semplice jekyll serve, senza le --watch o -w bandiere, il sito costruisce e serve bene alla porta 4000. Tuttavia questo non è l'ideale per lo sviluppo.

Link to Jekyll Usage

risposta

10

Come mostrato nel messaggio di errore, wdm non si trova.

In primo luogo, aggiornare il vostro gemme

gem update 

Poi, installare manualmente wdm

gem install wdm 
+1

Grazie per la risposta. Avevo ricevuto una risposta da un dev sul github di Jekyll con le stesse identiche direzioni, e funzionava come un incantesimo. Sono un po 'nuovo all'intera faccenda di Ruby e non sono stato in grado di interpretare il messaggio di errore per sapere cosa mi mancava. Grazie mille! – robabby

Problemi correlati