rtomayko / posix-spawn

Ruby process spawning library
Other
520 stars 52 forks source link

Windows - 'which' is not recognized as an internal or external command #61

Closed parisio closed 10 years ago

parisio commented 10 years ago

Hi. I've just recently dug into Jekyll. I'm running it over RubyInstaller on Windows 7. I'm able to get the basic site running on localhost:4000, and I seem to have all dependencies installed, but whenever I run a jekyll command such as build or serve in PowerShell, I get the following warning regarding posix-spawn. Please see the pasted excerpt below and let me know if this is a crucial issue that will give me more problems, and whether I can solve it myself locally. Thanks!

my-blog $ jekyll serve
Notice: for 10x faster LSI support, please install http://rb-gsl.rubyforge.org/
Configuration file: C:/dev/projects/my-blog/_config.yml
            Source: C:/dev/projects/my-blog
       Destination: C:/dev/projects/my-blog/_site
      Generating...
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/posix-spawn-0.3.9/lib/posix/spawn.rb:164
: warning: cannot close fd before spawn
'which' is not recognized as an internal or external command,
operable program or batch file.
                    done.
Configuration file: C:/dev/projects/my-blog/_config.yml
    Server address: http://0.0.0.0:4000/
  Server running... press ctrl-c to stop.
piki commented 10 years ago

Neither of the warnings is coming from posix_spawn, despite the line context.

"cannot close fd before spawn" comes from Ruby itself. It appears to come from posix_spawn, but the line indicated is actually just chaining to Ruby's built-in spawn.

which is not found because Windows doesn't have it, apparently not even in PowerShell. (Cygwin has it.) posix_spawn doesn't actually call which. It looks like maybe pygments does. Have you seen this issue: https://github.com/jekyll/jekyll/issues/2052?

hickford commented 9 years ago

Thanks I have the same problem.