title: Rails 5 Windows installation error
body: <p>currently trying to install rails on windows. Since I have already tried to find solutions and to fasten this up, here's a list:</p>
  
  <ul>
  <li>Using Windows 8 64bit</li>
  <li>DevKit (64bit) IS installed (On C: root)</li>
  <li>I'm admin and using CMD with admin rights</li>
  <li>Ruby Version: 2.3.1p112 (2016-04-26 revision 54768) [x68-mingw32]</li>
  <li>Gems Version: 2.6.7</li>
  </ul>
  
  <p>CMD Log: <a href="http://pastebin.com/cETfTDtr" rel="nofollow noreferrer">http://pastebin.com/cETfTDtr</a>
  On pastebin since somehow it doesn't want to format it properly.</p>
  
  <p>mkmf.log File:</p>
  
  <pre><code>have_header: checking for unistd.h... -------------------- yes
  
  "x86_64-w64-mingw32-gcc -o conftest.exe -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L. -L"C:/Program Files/Ruby/lib" -L.      -lx64-msvcrt-ruby230  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi  "
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;winsock2.h&gt;
  4: #include &lt;windows.h&gt;
  5: int main(int argc, char **argv)
  6: {
  7:   return 0;
  8: }
  /* end */
  
  "x86_64-w64-mingw32-gcc -E -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  conftest.c -o conftest.i"
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;winsock2.h&gt;
  4: #include &lt;windows.h&gt;
  5: #include &lt;unistd.h&gt;
  /* end */
  
  --------------------
  
  have_func: checking for rb_thread_blocking_region()... -------------------- no
  
  "x86_64-w64-mingw32-gcc -o conftest.exe -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L. -L"C:/Program Files/Ruby/lib" -L.      -lx64-msvcrt-ruby230  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi  "
  conftest.c: In function 't':
  conftest.c:16:57: error: 'rb_thread_blocking_region' undeclared (first use in this function)
  conftest.c:16:57: note: each undeclared identifier is reported only once for each function it appears in
  checked program was:
  /* begin */
   1: #include "ruby.h"
   2: 
   3: #include &lt;winsock2.h&gt;
   4: #include &lt;windows.h&gt;
   5: 
   6: /*top*/
   7: extern int t(void);
   8: int main(int argc, char **argv)
   9: {
  10:   if (argc &gt; 1000000) {
  11:     printf("%p", &amp;t);
  12:   }
  13: 
  14:   return 0;
  15: }
  16: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_blocking_region; return !p; }
  /* end */
  
  "x86_64-w64-mingw32-gcc -o conftest.exe -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L. -L"C:/Program Files/Ruby/lib" -L.      -lx64-msvcrt-ruby230  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi  "
  C:\Users\Dominik\AppData\Local\Temp\ccdMIqPq.o: In function `t':
  C:\Program Files\Ruby\lib\ruby\gems\2.3.0\gems\nio4r-1.2.1\ext\nio4r/conftest.c:17: undefined reference to `rb_thread_blocking_region'
  collect2.exe: error: ld returned 1 exit status
  checked program was:
  /* begin */
   1: #include "ruby.h"
   2: 
   3: #include &lt;winsock2.h&gt;
   4: #include &lt;windows.h&gt;
   5: 
   6: /*top*/
   7: extern int t(void);
   8: int main(int argc, char **argv)
   9: {
  10:   if (argc &gt; 1000000) {
  11:     printf("%p", &amp;t);
  12:   }
  13: 
  14:   return 0;
  15: }
  16: extern void rb_thread_blocking_region();
  17: int t(void) { rb_thread_blocking_region(); return 0; }
  /* end */
  
  --------------------
  
  have_func: checking for rb_thread_call_without_gvl()... -------------------- yes
  
  "x86_64-w64-mingw32-gcc -o conftest.exe -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L. -L"C:/Program Files/Ruby/lib" -L.      -lx64-msvcrt-ruby230  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi  "
  conftest.c: In function 't':
  conftest.c:16:57: error: 'rb_thread_call_without_gvl' undeclared (first use in this function)
  conftest.c:16:57: note: each undeclared identifier is reported only once for each function it appears in
  checked program was:
  /* begin */
   1: #include "ruby.h"
   2: 
   3: #include &lt;winsock2.h&gt;
   4: #include &lt;windows.h&gt;
   5: 
   6: /*top*/
   7: extern int t(void);
   8: int main(int argc, char **argv)
   9: {
  10:   if (argc &gt; 1000000) {
  11:     printf("%p", &amp;t);
  12:   }
  13: 
  14:   return 0;
  15: }
  16: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_call_without_gvl; return !p; }
  /* end */
  
  "x86_64-w64-mingw32-gcc -o conftest.exe -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L. -L"C:/Program Files/Ruby/lib" -L.      -lx64-msvcrt-ruby230  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi  "
  checked program was:
  /* begin */
   1: #include "ruby.h"
   2: 
   3: #include &lt;winsock2.h&gt;
   4: #include &lt;windows.h&gt;
   5: 
   6: /*top*/
   7: extern int t(void);
   8: int main(int argc, char **argv)
   9: {
  10:   if (argc &gt; 1000000) {
  11:     printf("%p", &amp;t);
  12:   }
  13: 
  14:   return 0;
  15: }
  16: extern void rb_thread_call_without_gvl();
  17: int t(void) { rb_thread_call_without_gvl(); return 0; }
  /* end */
  
  --------------------
  
  have_header: checking for sys/select.h... -------------------- no
  
  "x86_64-w64-mingw32-gcc -E -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  conftest.c -o conftest.i"
  conftest.c:5:24: fatal error: sys/select.h: No such file or directory
  compilation terminated.
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;winsock2.h&gt;
  4: #include &lt;windows.h&gt;
  5: #include &lt;sys/select.h&gt;
  /* end */
  
  --------------------
  
  have_header: checking for poll.h... -------------------- no
  
  "x86_64-w64-mingw32-gcc -E -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  conftest.c -o conftest.i"
  conftest.c:5:18: fatal error: poll.h: No such file or directory
  compilation terminated.
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;winsock2.h&gt;
  4: #include &lt;windows.h&gt;
  5: #include &lt;poll.h&gt;
  /* end */
  
  --------------------
  
  have_header: checking for sys/epoll.h... -------------------- no
  
  "x86_64-w64-mingw32-gcc -E -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  conftest.c -o conftest.i"
  conftest.c:5:23: fatal error: sys/epoll.h: No such file or directory
  compilation terminated.
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;winsock2.h&gt;
  4: #include &lt;windows.h&gt;
  5: #include &lt;sys/epoll.h&gt;
  /* end */
  
  --------------------
  
  have_header: checking for sys/event.h... -------------------- no
  
  "x86_64-w64-mingw32-gcc -E -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  conftest.c -o conftest.i"
  conftest.c:5:23: fatal error: sys/event.h: No such file or directory
  compilation terminated.
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;winsock2.h&gt;
  4: #include &lt;windows.h&gt;
  5: #include &lt;sys/event.h&gt;
  /* end */
  
  --------------------
  
  have_header: checking for port.h... -------------------- no
  
  "x86_64-w64-mingw32-gcc -E -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  conftest.c -o conftest.i"
  conftest.c:5:18: fatal error: port.h: No such file or directory
  compilation terminated.
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;winsock2.h&gt;
  4: #include &lt;windows.h&gt;
  5: #include &lt;port.h&gt;
  /* end */
  
  --------------------
  
  have_header: checking for sys/resource.h... -------------------- no
  
  "x86_64-w64-mingw32-gcc -E -I"C:/Program Files/Ruby/include/ruby-2.3.0/x64-mingw32" -I"C:/Program Files/Ruby/include/ruby-2.3.0"/ruby/backward -I"C:/Program Files/Ruby/include/ruby-2.3.0" -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  conftest.c -o conftest.i"
  conftest.c:5:26: fatal error: sys/resource.h: No such file or directory
  compilation terminated.
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;winsock2.h&gt;
  4: #include &lt;windows.h&gt;
  5: #include &lt;sys/resource.h&gt;
  /* end */
  
  --------------------
  </code></pre>