Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何安装';byebug';对于ruby on Windows?_Ruby On Rails_Ruby_Gem - Fatal编程技术网

Ruby on rails 如何安装';byebug';对于ruby on Windows?

Ruby on rails 如何安装';byebug';对于ruby on Windows?,ruby-on-rails,ruby,gem,Ruby On Rails,Ruby,Gem,我是ruby新手,正在尝试设置我的开发环境(Windows10)。我已经安装了ruby和rails,但无法安装byebug。据我所知,我首先需要DevKit。因此,我按照此处的指南安装了它: 然后试图安装宝石,但没有运气。 我尝试卸载并强制安装DevKit,但仍然无法安装byebug。 这就是我所看到的: C:\RubySDK>gem install byebug Temporarily enhancing PATH to include DevKit... Building nativ

我是ruby新手,正在尝试设置我的开发环境(Windows10)。我已经安装了ruby和rails,但无法安装byebug。据我所知,我首先需要DevKit。因此,我按照此处的指南安装了它:

然后试图安装宝石,但没有运气。 我尝试卸载并强制安装DevKit,但仍然无法安装byebug。 这就是我所看到的:

C:\RubySDK>gem install byebug
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing byebug:
        ERROR: Failed to build gem native extension.

    C:/Ruby22/bin/ruby.exe -r ./siteconf20150923-3628-5vg5h3.rb extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
generating byebug-i386-mingw32.def
compiling breakpoint.c
In file included from c:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
                 from ./byebug.h:4,
                 from breakpoint.c:1:
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:111:14: error: size of array 'ruby_check_sizeof_voidp' is negative
In file included from c:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
                 from ./byebug.h:4,
                 from breakpoint.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: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1157:2: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1158:6: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1158:27: error: cast to pointer from integer of different size [-Werror=int-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: error: cast to pointer from integer of different size [-Werror=int-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: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1271:34: error: cast to pointer from integer of different size [-Werror=int-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: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:36: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:36: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:36: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1345:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1345:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1345:9: error: cast to pointer from integer of different size [-Werror=int-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: error: cast to pointer from integer of different size [-Werror=int-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: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c: In function 'eval_expression':
breakpoint.c:21:45: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:21:45: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:21:45: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c: In function 'filename_cmp_impl':
breakpoint.c:288:11: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:288:11: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:288:11: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:292:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:292:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:292:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c: In function 'find_breakpoint_by_pos':
breakpoint.c:458:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:458:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:458:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:460:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:460:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:460:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c: In function 'find_breakpoint_by_method':
breakpoint.c:480:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:480:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:480:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
cc1.exe: all warnings being treated as errors
make: *** [breakpoint.o] Error 1

make failed, exit code 2

Gem files will remain installed in C:/Ruby22/lib/ruby/gems/2.2.0/gems/byebug-6.0.2 for inspection.
Results logged to C:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/byebug-6.0.2/gem_make.out
还有别的办法吗?
谢谢

您还必须安装以下版本:

gem安装byebug-v5.0.0

如果您需要更多信息,请点击这里的链接

找到了问题。
看起来我使用了错误的DevKit版本。我在安装32位ruby时安装了64位

我知道这是一个迟到的回复

但是当您在使用DevKit时遇到困难,在本机gem(如buybug或json)的情况下,您必须知道,如果您的系统类型为64位,则必须使用RubyInstaller 64位和DevKit 64位。对32位系统类型遵循相同的原则,使用RubyInstaller 32位和DevKit 32位

另外,在安装ruby、rails和DevKit之后,不要忘记运行几个命令,要做到这一点,请通过终端(windows中的cmd)永久安装DevKit并运行:

命令:

  • ruby dk.rb init
    -这将创建配置文件
  • 然后运行
    ruby dk.rb安装
  • 干杯,快乐编码。 伊布拉克斯