2012-01-12 121 views
9

我試過很多解決方案,但似乎沒有任何工作! 我使用Ruby 1.9.3和Rails 3.1.3,我想安裝ruby-debug19 gem。此北京時間我在PowerShell中得到:無法在安裝紅寶石1.9.2和1.9.3的win7上安裝gem ruby​​-debug19

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 

回答

2

類似的問題,有人問JetBrains公司的網站,它的解決方案爲我工作: http://devnet.jetbrains.com/message/5443846#5443846

你應該通過

curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem 
gem install linecache19-0.5.13.gem 
安裝新linecache19寶石

然後ruby-debug-base19x via

gem install --pre ruby-debug-base19x 
+0

非常感謝!現在我已經安裝了這個寶石。但是,rubymine希望ruby-debug-ide用於調試模式。如果我嘗試安裝這個gem,我會在PowerShell中得到以下錯誤:錯誤:安裝ruby-debug-ide錯誤:錯誤:無法構建gem原生擴展 – kampfsau1808 2012-01-12 15:37:39

+0

我不確定,但我認爲你需要[DevKit ](http://rubyinstaller.org/add-ons/devkit/)安裝 – 2012-01-12 17:12:31

+0

我已經安裝了devkit(對於ruby 1.9.2和1.9.3) – kampfsau1808 2012-01-13 12:07:23

13

我也曾有過類似的問題越來越安裝紅寶石調試base19x和我已經能夠得到它使用安裝成功如下:

gem install ruby-debug-base19x -v 0.11.30.pre3 

這個工作,其運行窗口7我的機器上與碧雲(見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... 

w^hile這對我有用,它是一個移動的目標,因爲我們正在使用gem的預發佈版本來完成任務。最好留意發佈。

只是附加的註釋,在寫入電流預發行的時間爲0.11.30.pre6不工作,所以只是做以下將失敗:

gem install ruby-debug-base19x --pre 
+0

這是什麼神祕寶石ruby-debug-base19x敢於問? – rogerdpack 2013-01-10 14:33:17

+0

另外值得一提的是,你必須改變Gemfile中的行:gem「ruby-debug-base19x」,「〜> 0.11.29」 – 2013-06-23 08:41:03

2

有類似的問題與Mac OS X RMVM紅寶石1.9.3-P0和一個gem install ruby-debug-base19x --pre做了伎倆。

這安裝了pre10版本,似乎有伎倆。