Ruby   发布时间:2022-04-03  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了在安装ruby 1.9.2和1.9.3的win7上无法安装gem ruby​​-debug19大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我尝试了许多解决方案,但似乎没有任何工作!
我使用 Ruby 1.9.3和Rails 3.1.3,我想安装ruby-debug19 gem.这是从PowerShell得到的
PS C:\Users\**\**\**> gem install ruby-debug19
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug19:
        ERROR: Failed to build gem native extension.

        C:/Ruby193/bin/ruby.exe extconf.rb
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... no
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config.
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... yes
checking for iseq.h... yes
checking for insns.inc... yes
checking for insns_info.inc... yes
checking for eval_intern.h... yes
creating Makefile

make
generating ruby_debug-i386-mingw32.def
compiling breakpoint.c
compiling ruby_debug.c
ruby_debug.c:29:19: error: conflicting types for 'rb_iseq_compile_with_option'
C:/Ruby193/include/ruby-1.9.1/ruby-1.9.3-p0/vm_core.h:505:7: note: previous declaration of 'rb_iseq_compile_with_option' was here
ruby_debug.c: In function 'context_jump':
ruby_debug.c:2414:53: warning: comparison between signed and unsigned integer expressions
ruby_debug.c:2428:27: warning: comparison between signed and unsigned integer expressions
make: *** [ruby_debug.o] Error 1


Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25/ext/ruby_debug/gem_make.out

解决方法

我已经有一个类似的问题得到ruby-debug-base19x安装,我已经能够使用以下内容成功安装:
gem install ruby-debug-base19x -v 0.11.30.pre3

这是在我的开发机器上运行窗口7以及pik(见https://github.com/vertiginous/pik),devkit(参见https://github.com/oneclick/rubyinstaller/wiki/development-kit)和Ruby 1.9.3p0 / 1.9.2p290

以下是安装时您应该看到的示例:

C:\>gem install ruby-debug-base19x -v 0.11.30.pre3
Fetching: columnize-0.3.6.gem (100%)
Fetching: archive-tar-minitar-0.5.2.gem (100%)
Fetching: ruby_core_source-0.1.5.gem (100%)
Fetching: linecache19-0.5.12.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Fetching: ruby-debug-base19x-0.11.30.pre3.gem (100%)
Building native extensions.  This could take a while...
Successfully installed columnize-0.3.6
Successfully installed archive-tar-minitar-0.5.2
Successfully installed ruby_core_source-0.1.5
Successfully installed linecache19-0.5.12
Successfully installed ruby-debug-base19x-0.11.30.pre3
5 gems installed
Installing ri documentation for columnize-0.3.6...
Installing ri documentation for archive-tar-minitar-0.5.2...
Installing ri documentation for ruby_core_source-0.1.5...
Installing ri documentation for linecache19-0.5.12...
Installing ri documentation for ruby-debug-base19x-0.11.30.pre3...
Installing RDoc documentation for columnize-0.3.6...
Installing RDoc documentation for archive-tar-minitar-0.5.2...
Installing RDoc documentation for ruby_core_source-0.1.5...
Installing RDoc documentation for linecache19-0.5.12...
Installing RDoc documentation for ruby-debug-base19x-0.11.30.pre3...

虽然这对我来说是一个移动目标,因为我们正在使用预发行版本的gem来完成任务.最好留意发布.

另外要注意的是,在撰写本文时,当前的发行版是0.11.30.pre6,这不行,所以只做以下操作将失败:

gem install ruby-debug-base19x --pre

大佬总结

以上是大佬教程为你收集整理的在安装ruby 1.9.2和1.9.3的win7上无法安装gem ruby​​-debug19全部内容,希望文章能够帮你解决在安装ruby 1.9.2和1.9.3的win7上无法安装gem ruby​​-debug19所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: