Hi all,
I've never been clear on when exactly we should use the --platform=ruby option when installing or updating gems. I thought it was supposed to be for those rare gems that use native C extensions, like RDiscount.
But the DevKit example applies --platform=ruby to the JSON gem too. So I'm wondering... is it a safe default to just always include --platform=ruby when installing any gem? Would it break gems that don't use native C extensions?
By the way, there are three gems that I'm never able to update, whether I add --platform=ruby or not: io-console, json, and psych. Typical errors start like this:
PS C:\WINDOWS\system32> gem update json
Updating installed gems
Updating json
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
C:/Ruby/bin/ruby.exe -r ./siteconf20161219-10028-1ppvq3.rb extconf.rb
creating Makefile
current directory: C:/Ruby/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
make "DESTDIR=" clean
0 [main] sh 10720 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
make: [clean] Error 5 (ignored)
Any ideas on what's happening there? I'm running Ruby 2.3.3p222 (2016-11-21 revision 56859), 64-bit, the RubyInstaller version, on Windows 10 64-bit. Note in the above that it goes through the DevKit motions, building native extensions, etc. whether I include --platform=ruby or not.
Cheers,
Joe