Reputation: 1773
I took a look to a lot of errors like this but no solution one works for me. I had Rails working till some days ago, and i can't really understand what's wrong with it. Making a bundle install of a new app, it gives:
Installing json (1.7.7) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make
generating generator-i386-mingw32.def
make: *** [generator-i386-mingw32.def] Error 253
Gem files will remain installed in C:/RailsInstaller/Ruby193/lib/ruby/gems/1.9.1
/gems/json-1.7.7 for inspection.
Results logged to C:/RailsInstaller/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.7.7/
ext/json/ext/generator/gem_make.out
An error occured while installing json (1.7.7), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling.
I have the DevKit installed, after have reinstalled everything with the RailsInstaller, then installed DevKit by itself. I have MinGW installed.
I am not new to Rails, I can't just figure out what's wrong, some days ago everything was working.. and I can't think to something I've installed that can make conflicts
Thanks.
EDIT with Solution: I finally got it working (some days after posted this) by reinstalling the operating system :) Then I understood trying it another time and swearing against the command line, the fault was of ansicon, making crashing every single executable via command line and via windows services. Every recent version I tried makes this, I can't explain it.
Upvotes: 2
Views: 1901
Reputation: 867
I had same issue and tried with
gem 'jquery-rails'
platforms :ruby do
gem 'json'
end
platforms :mswin, :mingw do
gem 'json_pure'
end
in gem file and I got it working
Upvotes: 1
Reputation: 1078
Check this troubleshooting guide at Rubyinstaller wiki: https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-gems_fails_comspec_autorun
My case was after updating Windows and "Scenario B" do the "trick".
Upvotes: 1