Skip to content
This repository was archived by the owner on Nov 29, 2017. It is now read-only.

Can't start server with jekyll 2.0.3 on windows. #64

Closed
FernandoBasso opened this issue Jun 3, 2014 · 29 comments
Closed

Can't start server with jekyll 2.0.3 on windows. #64

FernandoBasso opened this issue Jun 3, 2014 · 29 comments

Comments

@FernandoBasso
Copy link

When I type:

D:\Fernando\prog\fernandobasso.github.io>jekyll server --watch
Configuration file: D:/Fernando/prog/fernandobasso.github.io/_config.yml
            Source: D:/Fernando/prog/fernandobasso.github.io
       Destination: D:/Fernando/prog/fernandobasso.github.io/_site
      Generating...
                    done.
jekyll 2.0.3 | Error:  undefined method `_log' for Listen::Adapter::Windows:Class

Google didn't help this time.

ruby 1.9.3p545 (2014-02-24) [i386-mingw32]

gem 1.8.28

@ndarville
Copy link

What happens if you type serve, without the r at the end?

@FernandoBasso
Copy link
Author

Same stuff. If in _config.yml I comment out the line

highlighter: true

then it works. So, that seems to be the problem. The error message gives no clue about this, though.

@parkr
Copy link
Member

parkr commented Jun 3, 2014

highlighter should be set to either pygments or rouge, not to anything else.

@FernandoBasso
Copy link
Author

The problem is the --watch option. That is where the error about the _log stuff comes from.

@parkr
Copy link
Member

parkr commented Jun 3, 2014

That probably has something to do with jekyll/jekyll#2320.
Try upgrading to Listen v2.7.6 and trying again.

@FernandoBasso
Copy link
Author

D:\Fernando\prog\fernandobasso.github.io>gem install listen -v 2.7.6
Fetching: listen-2.7.6.gem (100%)
Successfully installed listen-2.7.6
1 gem installed
Installing ri documentation for listen-2.7.6...
Installing RDoc documentation for listen-2.7.6...

D:\Fernando\prog\fernandobasso.github.io>jekyll serve --watch
Configuration file: D:/Fernando/prog/fernandobasso.github.io/_config.yml
            Source: D:/Fernando/prog/fernandobasso.github.io
       Destination: D:/Fernando/prog/fernandobasso.github.io/_site
      Generating...
C:/Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.8/lib/posix/spawn.rb:162: warning: cannot close fd before spawn
'which' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
←[31m  Liquid Exception: No such file or directory - python C:/Ruby193/lib/ruby/gems/1.9.1/gems/pygments.rb-0.5.4/lib/pygments/mentos.py in _posts/2014-03-10-welcome-to-jekyll.markdown←[0m
                    done.
jekyll 2.0.3 | Error:  undefined method `_log' for Listen::Adapter::Windows:Class

@parkr
Copy link
Member

parkr commented Jun 3, 2014

Looks like you need to install Python and Pygments in order to run the site. Set highlighter: rouge in your _config.yml.

Also, uninstall all other versions of Listen you have installed.

@FernandoBasso
Copy link
Author

Okay, but my _config.yml has just this:

name: Your New Jekyll Site
markdown: redcarpet
#highlighter: pygments

Shouldn't jekyll completely ignore highlighter then?

If I run the server without the --watch option, the server runs:

D:\Fernando\prog\fernandobasso.github.io>jekyll serve
Configuration file: D:/Fernando/prog/fernandobasso.github.io/_config.yml
            Source: D:/Fernando/prog/fernandobasso.github.io
       Destination: D:/Fernando/prog/fernandobasso.github.io/_site
      Generating...
C:/Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.8/lib/posix/spawn.rb:162: warning: cannot close fd before spawn
'which' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
←[31m  Liquid Exception: No such file or directory - python C:/Ruby193/lib/ruby/gems/1.9.1/gems/pygments.rb-0.5.4/lib/pygments/mentos.py in _posts/2014-03-10-welcome-to-jekyll.markdown←[0m
                    done.
Configuration file: D:/Fernando/prog/fernandobasso.github.io/_config.yml
    Server address: http://0.0.0.0:4000/
  Server running... press ctrl-c to stop.

But when I try `http://127.0.0.1:4000' I only see a blank page, even though I do have an index.html with some stuff in it.

@parkr
Copy link
Member

parkr commented Jun 3, 2014

Shouldn't jekyll completely ignore highlighter then?

No, Jekyll defaults highlighter to pygments. Set it to rouge or null.

I only see a blank page, even though I do have an index.html with some stuff in it.

What is the contents of _site/index.html?

@albertogg
Copy link
Member

@FernandoBasso It still is using pygments. try what @parkr said.. install rouge gem install rouge if you haven't and test that.

@FernandoBasso
Copy link
Author

With rouge it works. Still, I had to drop the --watch option for the server to run.

@albertogg
Copy link
Member

@FernandoBasso great. Check that you are using Listen version 2.7.6.

@FernandoBasso
Copy link
Author

Yes.

gem list | findstr listen
listen (2.7.6)

@albertogg
Copy link
Member

Can you post the complete stack trace? I don't know if it would work but, jekyll serve --watch --trace

@FernandoBasso
Copy link
Author

EDIT: This is what SOLVED the problem:

Uninstalling listen 2.7.6 and installing listen 2.7.5 seems to have solved the issue.

This stackoverflow post lead me to give it a try.

@FernandoBasso
Copy link
Author

I uninstalled listen 2.7.5 and installed 2.7.6 to get you the stack trace. Here it is:

Removing listen
Successfully uninstalled listen-2.7.5

D:\Fernando\prog\fernandobasso.github.io>gem install listen
Fetching: listen-2.7.6.gem (100%)
Successfully installed listen-2.7.6
Parsing documentation for listen-2.7.6
Installing ri documentation for listen-2.7.6
1 gem installed

D:\Fernando\prog\fernandobasso.github.io>jekyll serve --watch --trace
Configuration file: D:/Fernando/prog/fernandobasso.github.io/_config.yml
            Source: D:/Fernando/prog/fernandobasso.github.io
       Destination: D:/Fernando/prog/fernandobasso.github.io/_site
      Generating...
                    done.
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.6/lib/listen/adapter/windows.rb:21:in `rescue in usable?': undefined method `_log' for Listen::Adapter::Windows:Class (NoMethodError)
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.6/lib/listen/adapter/windows.rb:17:in `usable?'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.6/lib/listen/adapter.rb:32:in `each'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.6/lib/listen/adapter.rb:32:in `detect'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.6/lib/listen/adapter.rb:32:in `_usable_adapter_class'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.6/lib/listen/adapter.rb:20:in `select'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.6/lib/listen/listener.rb:252:in `_adapter_class'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.6/lib/listen/listener.rb:208:in `_init_actors'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.6/lib/listen/listener.rb:72:in `block in <class:Listener>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/fsm.rb:175:in `instance_eval'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/fsm.rb:175:in `call'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/fsm.rb:127:in `transition_with_callbacks!'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/fsm.rb:95:in `transition'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.6/lib/listen/listener.rb:85:in `start'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/commands/build.rb:87:in `watch'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/commands/build.rb:31:in `process'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/commands/serve.rb:23:in `block (2 levels) in init_with_program'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/command.rb:220:in `call'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/command.rb:220:in `block in execute'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/command.rb:220:in `each'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/command.rb:220:in `execute'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/program.rb:35:in `go'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary.rb:22:in `program'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/bin/jekyll:18:in `<top (required)>'
        from C:/Ruby200-x64/bin/jekyll:23:in `load'
        from C:/Ruby200-x64/bin/jekyll:23:in `<main>'

D:\Fernando\prog\fernandobasso.github.io>

@FernandoBasso
Copy link
Author

Well, I am stuck on this windows machine at work anyway. Thanks for all the help and patience. I really appreciate it.

PS: Should I close this?

@albertogg
Copy link
Member

No problem, at least you got a solution. I will reference this issue in the guard/listen repo to let them know of this problem. It seems that they touched some Windows stuff in the 2.7.6 which may be causing this issue.

@seanpoulter
Copy link

Unfortunately I can confirm I get the same stack trace as @FernandoBasso above using ruby 2.0.0p481 (2014-05-08) [i386-mingw32], jekyll-2.0.3, and listen (2.7.6).

@albertogg
Copy link
Member

Hey, @seanpoulter and @FernandoBasso could you try running jekyll with listen (2.7.7) and see if it stills errors out?

@FernandoBasso
Copy link
Author

Not for me. I still get that error:

jekyll 2.0.3 | Error:  undefined method `_log' for Listen::Adapter::Windows:Class

@rohaan911
Copy link

Running gem update listen to update my 'listen' ruby gem to version 2.7.8 (released on 12th June, 2014) seemed to fix this bug.

Also, to run Jekyll server in watch mode for versions 1.0+ , I use jekyll serve --watch. According to the documentation, the --server command now seems to be obsolete.

Hope that helps.

@FernandoBasso
Copy link
Author

Updated to listen 2.7.8 and now I am able to start jekyll server with the --watch option. Everything is working fine now. Thanks to everybody for the support.

@parkr parkr closed this as completed Jun 16, 2014
@alcidesqueiroz
Copy link

I've just updated listen to 2.7.8 and that did the job! Now, jekyll serve --watch is working perfectly!

@raquelbarra
Copy link

Well, i tried all! But, fail :(

@parkr
Copy link
Member

parkr commented Mar 26, 2015

@rsb12php You're using bundle exec jekyll serve on the latest version of Jekyll?

@raquelbarra
Copy link

@parkr it's all right now, but thak you

@raquelbarra
Copy link

@parkr I using Windows 8
jekyll - Auto regeneration is not working!
Do you can help me?

@anegronweb
Copy link

I had the same problem. I add "highlighter: rouge" and it work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants