Reputation: 6047
I am trying to get Rails working on a Windows system. I installed RubyInstaller and the Devkit, but I cannot seem to get the json
gem to install. When I try gem install json
I get:
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make
generating generator-i386-mingw32.def
compiling generator.c
generator.c:1:0: error: CPU you selected does not support x86-64 instruction set
generator.c:1:0: error: CPU you selected does not support x86-64 instruction set
make: *** [generator.o] Error 1
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
It could be my Ruby versions (I have both 2.2 and 1.9), but I do not know. What is going on?
Upvotes: 1
Views: 894
Reputation: 6047
After @Azolo posted his comment, I discovered that the DevKit version I was using did not match the Ruby version I was running. The problem came to be because I needed Ruby 1.9.3 on the path for the Heroku client to function, but was trying to use 2.2 DevKit (as I typically use Ruby 2.2 for development.
Upvotes: 1