Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
465 views
in Technique[技术] by (71.8m points)

Why does installing Ruby on Rails generate error "size of array 'ruby_check_sizeof_voidp' is negative"?

When installing Ruby on Rails (via gem install rails) you may get the following error message:

c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:109:14: error: size of array 'ruby_check_sizeof_voidp' is negative

There will also be many warnings like this:

c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1333:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

and an additional error

c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:41:8: error: redefinition of 'struct timespec'

Why does this happen and how can I install Rails successfully?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This happens when you have installed the wrong version of the DevKit for your version of Ruby, e.g., if you installed DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe into Ruby version 1.9.3.

To correct the problem, reinstall Ruby and install the correct DevKit for your version of Ruby, as indicated in the section titled "Which Development Kit?" at http://rubyinstaller.org/downloads.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...