ruby-on-rails - 错误消息 : Make sure that `gem install debug_inspector -v ' 0. 0。2'` 捆绑前成功

标签 ruby-on-rails c ruby windows

我是编程新手,我已经开始安装 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.

抱歉,如果我在发布此内容时犯了任何错误。谢谢!

最佳答案

当您看到消息时:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

很可能无法构建 native 扩展,因为某些缺少系统库的问题,甚至是您的 Ruby/DevKit 版本。

我不熟悉 Windows 上的 Ruby,当我第一次开始使用 Rails 时就切换到了 OSX。

在你的例子中,我发现了类似的 question可能对您有帮助。

关于ruby-on-rails - 错误消息 : Make sure that `gem install debug_inspector -v ' 0. 0。2'` 捆绑前成功,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38111894/

相关文章:

ruby-on-rails - 有必要force_ssl吗?或者 SSL 应该在负载均衡器处终止吗?

c - 如果没有 default case,switch 会做什么?

c++ - 是否可以访问物理地址0?

ruby-on-rails - rails : Joining the same table twice and querying a joined attribute

ruby - Maven 找不到 JRuby mojo 描述符

ruby-on-rails - Nokogiri:解析不规则 "<"

ruby-on-rails - 带条件的 Rails as_json

c - C语言中如何从文件夹中读取文件

ruby-on-rails - rails 不再生成脚本/服务器

ruby-on-rails - 如何在 Rails 中添加禁用的提交按钮