Gem install does not work with a "patch" not recognized (windows)

I install a therubyracer

gem on windows and get the error β€œpatch” is not recognized as an internal or external command, operative program, or batch file. ”I need this gem because when I try to use less it says to install therubyracer.

Here's the complete output:

C:\>ruby --version
ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]

C:\>gem install therubyracer
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
        ERROR: Failed to build gem native extension.

    C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20150629-3268-otarv8.rb extconf.rb
creating Makefile
'patch' is not recognized as an internal or external command,
operable program or batch file.
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.9/ext/libv8/patcher.rb:50:in `block (2 levels) in patch!': failed to apply
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.9/ext/libv8/patcher.rb:48:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.9/ext/libv8/patcher.rb:48:in `block in patch!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.9/ext/libv8/patcher.rb:44:in `open'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.9/ext/libv8/patcher.rb:44:in `patch!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.9/ext/libv8/builder.rb:57:in `block in build_libv8!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.9/ext/libv8/builder.rb:52:in `chdir'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.9/ext/libv8/builder.rb:52:in `build_libv8!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.9/ext/libv8/location.rb:24:in `install!'
        from extconf.rb:7:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.9 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/libv8-3.16.14.9/gem_make.out

      

The specified log file contains no more information than the above.

I don't even know where to start this problem.

Note. I have ruby ​​dev kit installed onC:\RubyDevKit-mingw64-64-4.7.2

EDIT:

I am doing all this because I am running jekyll and trying to use Less for Jekyll .

Based on some other stackoverflow StackOverflow questions , I installed an old version (3.11.8.0) of the libv8 gem. It installed correctly, but did not fix the error. It looks like therubyracer includes its own copy of libv8.

I've installed "therubyracer_for_windows" . But after that, when I tried to start jekyll, I got the error:

Configuration file: C:/data/adamantworks/Adamantworks.Web-jekyll/_config.yml
jekyll 2.5.2 | Error:  uninitialized constant V8::JSError

      

So, it seems like it contains something deprecated that is incompatible with jekyll. I removed therubyracer_for_windows.

+3


source to share


1 answer


I had the same problem. Do 'bundle update libv8' and do it;)



-1


source







All Articles