简体   繁体   中英

Error while installing rails on ruby. Please check the error code and advise?

So ive been trying to install rails on my windows, but I keep getting this error. MY ruby version is 2.3.3p222.

and I have updated my gems to 2.7.8

I have had no trouble in installing any other gems so far and Ive also installed gems like rack or rake prior to this.

This is the error I get-

C:\Users\rafeh\RubymineProjects\untitled>gem install rails
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR:  Error installing rails:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/websocket-driver-0.7.0/ext/websocket-driver
C:/Ruby23/bin/ruby.exe -r ./siteconf20181126-14776-9pzyr1.rb extconf.rb


current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/websocket-driver-0.7.0/ext/websocket-driver
make "DESTDIR=" clean

current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/websocket-driver-0.7.0/ext/websocket-driver
make "DESTDIR="
generating websocket_mask-i386-mingw32.def
compiling websocket_mask.c
In file included from c:/Ruby23/include/ruby-2.3.0/ruby.h:33:0,
                 from websocket_mask.c:1:
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:131:14: error: size of array 'ruby_check_sizeof_voidp' is negative
In file included from c:/Ruby23/include/ruby-2.3.0/ruby.h:33:0,
                 from websocket_mask.c:1:
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_obj_freeze_inline':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1360:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1361:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1362:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1362:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_data_object_get':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1400:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_data_object_make':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1414:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_data_typed_object_make':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1421:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_num2char_inline':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1588:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1588:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1588:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_class_of':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1949:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_type':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1966:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
In file included from c:/Ruby23/include/ruby-2.3.0/ruby.h:33:0,
                 from websocket_mask.c:1:
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_clone_setup':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1997:56: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1998:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1999:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1999:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_dup_setup':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2005:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2006:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2006:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_array_len':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2012:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2013:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2013:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_array_const_ptr':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2027:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2027:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2027:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_struct_len':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2034:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2035:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2035:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_struct_const_ptr':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2041:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2041:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2041:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c: In function 'method_websocket_mask':
websocket_mask.c:26:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:26:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:26:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:30:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:30:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:30:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:31:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:31:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:31:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:32:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:32:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:32:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:35:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:35:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
websocket_mask.c:35:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
make: *** [websocket_mask.o] Error 1

make failed, exit code 2

What do you think might be causing this, please advice.

Turns out there was a miss match b/w the devkit and the bit version. Installed ruby again in 64 bits again and it worked!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM