# Install error in win

**URL:** https://talk.jekyllrb.com/t/install-error-in-win/3710
**Category:** Help
**Created:** [December 16, 2019, 6:14am UTC](https://talk.jekyllrb.com/t/install-error-in-win/3710 "2019-12-16T06:14:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![walkenzhong](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@walkenzhong](https://talk.jekyllrb.com/u/walkenzhong)
#### Post date: [December 16, 2019, 6:14am UTC](https://talk.jekyllrb.com/t/install-error-in-win/3710/1 "2019-12-16T06:14:48Z")

</div>

when i install jekyll in win, i meet the following error, dose anyone have idea to solve it?

C:\Users\_\_hao\>gem install jekyll  
Temporarily enhancing PATH for MSYS/MINGW…  
Building native extensions. This could take a while…  
ERROR: Error installing jekyll:  
ERROR: Failed to build gem native extension.

```
current directory: D:/ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser

```

D:/ruby/Ruby26-x64/bin/ruby.exe -I D:/ruby/Ruby26-x64/lib/ruby/site\_ruby/2.6.0 -r ./siteconf20191216-12868-1ul5dum.rb extconf.rb  
creating Makefile

current directory: D:/ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http\_parser.rb-0.6.0/ext/ruby\_http\_parser  
make “DESTDIR=” clean

current directory: D:/ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http\_parser.rb-0.6.0/ext/ruby\_http\_parser  
make “DESTDIR=”  
generating ruby\_http\_parser-x64-mingw32.def  
compiling ruby\_http\_parser.c  
In file included from D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/crtdefs.h:10,  
from D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/stddef.h:7,  
from D:/ruby/Ruby26-x64/msys64/mingw64/lib/gcc/x86\_64-w64-mingw32/9.2.0/include/stddef.h:1,  
from D:\mingw\include/stdio.h:69,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/defines.h:123,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/ruby.h:29,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby.h:33,  
from ruby\_http\_parser.c:1:  
D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/corecrt.h:40:18: error: expected ‘;’ before ‘typedef’  
40 | \_\_MINGW\_EXTENSION typedef unsigned \_\_int64 size\_t;  
| ^ ~~~~~~~  
| ;  
D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/corecrt.h:50:18: error: expected ‘;’ before ‘typedef’  
50 | \_\_MINGW\_EXTENSION typedef \_\_int64 ssize\_t;  
| ^ ~~~~~~~  
| ;  
D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/corecrt.h:67:18: error: expected ‘;’ before ‘typedef’  
67 | \_\_MINGW\_EXTENSION typedef \_\_int64 intptr\_t;  
| ^ ~~~~~~~  
| ;  
D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/corecrt.h:80:18: error: expected ‘;’ before ‘typedef’  
80 | \_\_MINGW\_EXTENSION typedef unsigned \_\_int64 uintptr\_t;  
| ^ ~~~~~~~  
| ;  
D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/corecrt.h:93:18: error: expected ‘;’ before ‘typedef’  
93 | \_\_MINGW\_EXTENSION typedef \_\_int64 ptrdiff\_t;  
| ^ ~~~~~~~  
| ;  
D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/corecrt.h:128:18: error: expected ‘;’ before ‘typedef’  
128 | \_\_MINGW\_EXTENSION typedef \_\_int64 \_\_time64\_t;  
| ^ ~~~~~~~  
| ;  
In file included from D:\mingw\include/stdio.h:94,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/defines.h:123,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/ruby.h:29,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby.h:33,  
from ruby\_http\_parser.c:1:  
D:\mingw\include/sys/types.h:123:21: error: conflicting types for ‘ssize\_t’  
123 | typedef \_ssize\_t ssize\_t;  
| ^ ~~~~~~  
In file included from D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/crtdefs.h:10,  
from D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/stddef.h:7,  
from D:/ruby/Ruby26-x64/msys64/mingw64/lib/gcc/x86\_64-w64-mingw32/9.2.0/include/stddef.h:1,  
from D:\mingw\include/stdio.h:69,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/defines.h:123,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/ruby.h:29,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby.h:33,  
from ruby\_http\_parser.c:1:  
D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/corecrt.h:50:35: note: previous declaration of ‘ssize\_t’ was here  
50 | \_\_MINGW\_EXTENSION typedef \_\_int64 ssize\_t;  
| ^ ~~~~~~  
In file included from D:\mingw\include/stdio.h:541,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/defines.h:123,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/ruby.h:29,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby.h:33,  
from ruby\_http\_parser.c:1:  
D:\mingw\include/locale.h:51:42: error: conflicting types for ‘\_locale\_t’  
51 | typedef struct \_\_mingw\_opaque\_locale\_t \*\_locale\_t;  
| ^ ~~~~~~~~  
In file included from D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/crtdefs.h:10,  
from D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/stddef.h:7,  
from D:/ruby/Ruby26-x64/msys64/mingw64/lib/gcc/x86\_64-w64-mingw32/9.2.0/include/stddef.h:1,  
from D:\mingw\include/stdio.h:69,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/defines.h:123,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/ruby.h:29,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby.h:33,  
from ruby\_http\_parser.c:1:  
D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/corecrt.h:444:20: note: previous declaration of ‘\_locale\_t’ was here  
444 | } \_locale\_tstruct,\*\_locale\_t;  
| ^ ~~~~~~~~  
In file included from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/defines.h:125,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/ruby.h:29,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby.h:33,  
from ruby\_http\_parser.c:1:  
D:\mingw\include/sys/types.h:149:23: error: conflicting types for ‘time\_t’  
149 | typedef \_\_time32\_t time\_t;  
| ^ ~~~~~  
In file included from D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/crtdefs.h:10,  
from D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/stddef.h:7,  
from D:/ruby/Ruby26-x64/msys64/mingw64/lib/gcc/x86\_64-w64-mingw32/9.2.0/include/stddef.h:1,  
from D:\mingw\include/stdio.h:69,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/defines.h:123,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/ruby.h:29,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby.h:33,  
from ruby\_http\_parser.c:1:  
D:/ruby/Ruby26-x64/msys64/mingw64/x86\_64-w64-mingw32/include/corecrt.h:143:20: note: previous declaration of ‘time\_t’ was here  
143 | typedef \_\_time64\_t time\_t;  
| ^ ~~~~~  
In file included from D:\mingw\include/windef.h:269,  
from D:\mingw\include/windows.h:42,  
from D:\mingw\include/winsock.h:52,  
from D:\mingw\include/winsock2.h:62,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/win32.h:41,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/defines.h:345,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/ruby.h:29,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby.h:33,  
from ruby\_http\_parser.c:1:  
D:\mingw\include/winnt.h:2434:2: error: #error “undefined processor type”  
2434 | #error “undefined processor type”  
| ^ ~~~~  
D:\mingw\include/winnt.h:2436:9: error: unknown type name ‘CONTEXT’  
2436 | typedef CONTEXT \*PCONTEXT, \*LPCONTEXT;  
| ^ ~~~~~~  
In file included from D:\mingw\include/windows.h:44,  
from D:\mingw\include/winsock.h:52,  
from D:\mingw\include/winsock2.h:62,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/win32.h:41,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/defines.h:345,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby/ruby.h:29,  
from D:/ruby/Ruby26-x64/include/ruby-2.6.0/ruby.h:33,  
from ruby\_http\_parser.c:1:  
D:\mingw\include/winbase.h:2389:56: error: unknown type name ‘CONTEXT’  
2389 | WINBASEAPI BOOL WINAPI SetThreadContext (HANDLE, const CONTEXT \*);  
| ^ ~~~~~~  
make: \*\*\* [Makefile:244锛歳uby\_http\_parser.o] 閿欒� 1

make failed, exit code 2

Gem files will remain installed in D:/ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http\_parser.rb-0.6.0 for inspection.  
Results logged to D:/ruby/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/http\_parser.rb-0.6.0/gem\_make.out

---

<div class="post-metadata">

### Author: ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)
#### Post date: [December 16, 2019, 8:43am UTC](https://talk.jekyllrb.com/t/install-error-in-win/3710/2 "2019-12-16T08:43:54Z")

</div>

You should have installed `ridk` when installing Ruby.  
Enable it for current terminal window by running:

```auto
ridk enable

```

If you didn’t install the program, _try installing it by:_

```auto
ridk install

```

If that fails, you may need to re-install Ruby and ensure that you run `ridk install` as the final step of installing.  
Then retry installing jekyll:

```auto
gem install jekyll

```

---

<div class="post-metadata">

### Author: ![walkenzhong](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@walkenzhong](https://talk.jekyllrb.com/u/walkenzhong)
#### Post date: [December 16, 2019, 9:20am UTC](https://talk.jekyllrb.com/t/install-error-in-win/3710/3 "2019-12-16T09:20:46Z")

</div>

hi ashmaroli, i try your solution, but it don’t work.  
i also try to re-install Ruby, and it still error.

there are three option when i use  
`ridk install`  
and i input  
`1,2,3`  
is it right?

1 - MSYS2 base installation  
2 - MSYS2 system update (optional)  
3 - MSYS2 and MINGW development toolchain

---

<div class="post-metadata">

### Author: ![Mayt13](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mayt13](https://talk.jekyllrb.com/u/Mayt13)
#### Post date: [September 22, 2020, 11:24pm UTC](https://talk.jekyllrb.com/t/install-error-in-win/3710/4 "2020-09-22T23:24:54Z")

</div>

I’m still puzzling through this myself, but this guide seems helpful. TL;DR looks like installing the Chocolatey packet manager first is a must.

> **[Setting Up a Ruby Development Environment on Windows](https://raviriley.github.io/tutorial/pinned/setting-up-windows-for-jekyll/)**
>
> Tutorial for setting up Ruby on Windows with Jekyll or Rails

Hope this helps
