我是编程新手,我已经开始安装Ruby on Rails了。我刚刚尝试创建我的第一个项目。 但是每当我尝试在我的项目中捆绑安装时,我都会在标题中收到消息。我正在使用Windows。
当我尝试捆绑安装时
Installing byebug 9.0.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/byebug-9.0.5/ext/byebug
C:/Ruby23/bin/ruby.exe -r ./siteconf20160630-6484-1le1k81.rb extconf.rb
creating Makefile
current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/byebug-9.0.5/ext/byebug
make "DESTDIR=" clean
current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/byebug-9.0.5/ext/byebug
make "DESTDIR="
generating byebug-i386-mingw32.def
compiling breakpoint.c
In file included from c:/Ruby23/include/ruby-2.3.0/ruby.h:33:0,
from byebug.h:4,
from breakpoint.c:1:
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:124: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 byebug.h:4,
from breakpoint.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:1353:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1354:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1355:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1355: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:1393: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:1407: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: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_num2char_inline':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1580:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1580:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1580:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1580:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1580:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1580:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1581:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1581:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1581: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:1942: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:1959: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 byebug.h:4,
from breakpoint.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:1990:56: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1991:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1992:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1992: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:1998:42: 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_array_len':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2005:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2006:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2006: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:2020:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2020:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2020: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:2027:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2028:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2028: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:2034:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2034:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2034:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
breakpoint.c: In function 'filename_cmp_impl':
breakpoint.c:288:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
breakpoint.c:288:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
breakpoint.c:288:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
breakpoint.c:292:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
breakpoint.c:292:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
breakpoint.c:292:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
breakpoint.c: In function 'find_breakpoint_by_pos':
breakpoint.c:458:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
breakpoint.c:458:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
breakpoint.c:458:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
make: *** [breakpoint.o] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby23/lib/ruby/gems/2.3.0/gems/byebug-9.0.5 for inspection.
Results logged to C:/Ruby23/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/byebug-9.0.5/gem_make.out
Using coffee-script-source 1.10.0
Using execjs 2.7.0
Using thor 0.19.1
Using concurrent-ruby 1.0.2
Using multi_json 1.12.1
Using mysql2 0.4.4
Using sass 3.4.22
Using tilt 2.0.5
Using rdoc 4.2.2
Using tzinfo 1.2.2
Using nokogiri 1.6.8
Using rack-test 0.6.3
Using mime-types 3.1
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot
continue.
Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before
bundling.
当我尝试安装debug_inspector
时C:\Users\User\Documents\Sites>gem install debug_inspector
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing debug_inspector:
ERROR: Failed to build gem native extension.
很抱歉,如果我发布了这个错误。谢谢!
答案 0 :(得分:0)
当您看到消息时:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
很可能无法构建本机扩展,因为某些系统库存在问题,甚至是您的Ruby / DevKit版本。
我不熟悉Windows上的Ruby,在我第一次使用Rails时切换到了OSX。
在您的情况下,我发现了类似的question 可能可以帮助您。