5

I'm new in ROR and I'm trying to install DevKit but I get some errors. I use Win7-64bit and i installed DevKit-mingw64-64-4.7.2-20130224-1432-sfx. I followed the installation in github. Honestly, the errors are not clear and I can't find out what I should do to fix the problem.

 C:\Devkit>type config.yml
 This configuration file contains the absolute path locations of all
 installed Rubies to be enhanced to work with the DevKit. This config
 file is generated by the 'ruby dk.rb init' step and may be modified
 before running the 'ruby dk.rb install' step. To include any installed
 Rubies that were not automagically discovered, simply add a line below
 the triple hyphens with the absolute path to the Ruby root directory.

Example:
--
- C:/ruby19trunk
- C:/ruby192dev
--
c:/Ruby22

then

C:\Devkit>ruby dk.rb install

[INFO] Skipping existing gem override for '    c:/Ruby22'
[WARN] Skipping existing DevKit helper library for '    c:/Ruby22'

and

C:\Devkit>gem install json --platform=ruby   
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.

c:/Ruby22/bin/ruby.exe -r ./siteconf20150524-7692-son84q.rb extconf.rb

creating Makefile    
make "DESTDIR=" clean
make "DESTDIR="

   generating generator-i386-mingw32.def
   compiling     generator.c
   In file included from     c:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
   from ../fbuffer/fbuffer.h:5,
   from     generator.c:1:
   c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:111:14: error: size of array 'ruby_chec
   k_sizeof_voidp' is negative
   In file included from     c:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
   from ../fbuffer/fbuffer.h:5,
   from     generator.c:1:

c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_obj_freeze_inline':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1156:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1157:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1158:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1158:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_data_object_get':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1192:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_obj_written':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1271:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1271:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_num2char_inline':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1345:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1345:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1345:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_class_of':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1670:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_type':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1687:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

In file included from     generator.c:1:0:
../fbuffer/fbuffer.h: In function 'fbuffer_append_str':
../fbuffer/fbuffer.h:127:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../fbuffer/fbuffer.h:127:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../fbuffer/fbuffer.h:127:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

generator.c: In function 'convert_UTF8_to_JSON_ASCII':
generator.c:129:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:129:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:129:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:130:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:130:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:130:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'convert_UTF8_to_JSON':
generator.c:227:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:227:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:227:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:228:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:228:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:228:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_configure':
generator.c:559:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:559:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:559:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:560:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:560:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:560:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:567:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:567:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:567:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:568:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:568:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:568:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:575:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:575:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:575:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:576:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:576:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:576:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:583:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:583:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:583:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:584:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:584:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:584:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:591:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:591:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:591:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:592:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:592:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:592:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'set_state_ivars':
generator.c:640:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:640:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:640:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:642:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:642:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:642:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'generate_json_object':
generator.c:727:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:727:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:727:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'generate_json_array':
generator.c:773:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:773:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:773:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'isArrayOrObject':
generator.c:930:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:930:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:930:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:931:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:931:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:931:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_indent_set':
generator.c:1055:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1055:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1055:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1064:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1064:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1064:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_space_set':
generator.c:1093:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1093:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1093:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1102:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1102:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1102:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_space_before_set':
generator.c:1129:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1129:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1129:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1138:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1138:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1138:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_object_nl_set':
generator.c:1167:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1167:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1167:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1175:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1175:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1175:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_array_nl_set':
generator.c:1202:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1202:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1202:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1210:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1210:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1210:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in     c:/Ruby22/lib/ruby/gems/2.2.0/gems/json-1.8.2
for inspection.
Results logged to     c:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/jso
n-1.8.2/gem_make.out
Taher
  • 1,185
  • 3
  • 18
  • 36
  • did you give this command `ruby dk.rb init` before `ruby dk.rb install`? – inquisitive May 25 '15 at 06:30
  • Yes, I did it. I did everything according to https://github.com/oneclick/rubyinstaller/wiki – Taher May 25 '15 at 06:32
  • I appears that your path to ruby contain white spaces, check for that, if there are white spaces in the path, it does not work. I appears that there are spaces before `C:/ruby22` – inquisitive May 25 '15 at 06:33
  • No its not. There were problems on pasting codes in stackoverflow, I had to put white space. – Taher May 25 '15 at 06:37
  • 1
    In that case, I think there is version mismatch between the devkit you are using and the ruby version. For specific ruby version, there are specific devkits you need to download. see here http://stackoverflow.com/questions/15537191/why-does-installing-ruby-on-rails-generate-error-size-of-array-ruby-check-size. – inquisitive May 25 '15 at 06:40
  • Based on the rubyinstaller.org, there are three versions for devkit, and I chose devkit according to it. My operating system is 64bit and I installed ruby 2.2 – Taher May 25 '15 at 09:20

1 Answers1

10

I had the same set of errors and I resolved it by using the 32bit version of the devkit.

Even though the OS I am running appears to be Windows 7 64-bit the Ruby installation from the Ruby installer appears to have been 32-bit as found by:

C:\>ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]

Using the 32bit devkit (DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe) appears to have worked for me.

IKavanagh
  • 6,089
  • 11
  • 42
  • 47
Hiten
  • 101
  • 1
  • 3
  • Oh my, I had the same problem on Windows 10, 64-bit and rubyinstaller-2.2.4. I hadn't even bothered to look at the ruby version, but why the hell does the rubyinstaller install a 32 bit version... Anyways, thanks for this answer. – joergl Mar 22 '16 at 16:30
  • This was the only solution that worked for me. Same situation -- Win 10 thought I installed x64 ruby but instead have 32 bit. – kayleeFrye_onDeck Jun 24 '16 at 20:06
  • Confirmed as applicable for Windows 10 and rubyinstaller-2.3.0.exe (which claimed to be 64bit). `ruby -v` was also giving 32-bit version for me. DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe didn't work with the error in OP, DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe did the thing! – Pavel Bulanov Jul 11 '16 at 13:41