Related Question: ERROR: Failed to build gem native extension
I am trying to make ruby on rails (ruby 2.0.0p647 (2015-08-18) [x64-mingw32]) to work on my system. I'm running Windows 8.1 (64 bit)
The installation of ruby and rails goes smoothly but when i run rails new blog
I get the following error:
Installing json 1.8.3 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
creating Makefile
make "DESTDIR="
generating generator-x64-mingw32.def
compiling generator.c
linking shared-object json/ext/generator.so
c:/ruby200-x64/mingw64/mingw64/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.3/../../.
./../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc_s
c:/ruby200-x64/mingw64/mingw64/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.3/../../.
./../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc_s
collect2.exe: error: ld returned 1 exit status
make: *** [generator.so] Error 1
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/json-
1.8.3 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/json-1.8.3/ext/json/ex
t/generator/gem_make.out
Using minitest 5.8.3
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using rack 1.6.4
Using mime-types 2.99
Using arel 6.0.3
Installing debug_inspector 0.0.2 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
I have already tried installing ruby and the development kit 3 times (with different ruby versions) I keep getting the same error.
I have tried the solution in the question above.
I get a very similar error:
C:\Ruby200-x64>gem install --local json-1.8.3.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json-1.8.3.gem:
ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
creating Makefile
I have tried to reinstall ruby with different ruby version (the newest one) as well as installing both of the x86 versions of ruby and the development kit which did nothing for me.