2010-05-10 58 views
0

我,當我使用html2haml命令Haml的3和Rails的Ruby上1.9得到這個奇怪的錯誤在我的Windows 7電腦:奇怪Haml的3誤差與紅寶石1.9.1和Rails 3

-- control frame ---------- 
c:0017 p:-9593720 s:0052 b:0052 l:000051 d:000051 TOP 
c:0016 p:---- s:0050 b:0050 l:000049 d:000049 CFUNC :require 
c:0015 p:0026 s:0046 b:0046 l:000045 d:000045 TOP C:/Ruby/lib/ruby/gems/1.9.1/gems/hpricot-0.8.2-x86-mswin32/lib/hpricot.rb:20 
c:0014 p:---- s:0044 b:0044 l:000043 d:000043 FINISH 
c:0013 p:---- s:0042 b:0042 l:000041 d:000041 CFUNC :require 
c:0012 p:0095 s:0038 b:0038 l:000037 d:000037 TOP C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/html.rb:101 
c:0011 p:---- s:0036 b:0036 l:000035 d:000035 FINISH 
c:0010 p:---- s:0034 b:0034 l:000033 d:000033 CFUNC :require 
c:0009 p:0022 s:0030 b:0030 l:000029 d:000029 METHOD C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:559 
c:0008 p:0050 s:0023 b:0023 l:000022 d:000022 METHOD C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:41 
c:0007 p:0013 s:0020 b:0020 l:000019 d:000019 METHOD C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:22 
c:0006 p:0078 s:0016 b:0016 l:000015 d:000015 TOP C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/bin/html2haml:7 
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH 
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :load 
c:0003 p:0127 s:0007 b:0007 l:000e54 d:0020c0 EVAL C:/Ruby/bin/html2haml:19 
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH 
c:0001 p:0000 s:0002 b:0002 l:000e54 d:000e54 TOP 
--------------------------- 
-- Ruby level backtrace information----------------------------------------- 
C:/Ruby/lib/ruby/gems/1.9.1/gems/hpricot-0.8.2-x86-mswin32/lib/hpricot.rb:20:in `require' 
C:/Ruby/lib/ruby/gems/1.9.1/gems/hpricot-0.8.2-x86-mswin32/lib/hpricot.rb:20:in `<top (required)>' 
C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/html.rb:101:in `require' 
C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/html.rb:101:in `<top (required)>' 
C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:559:in `require' 
C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:559:in `process_result' 
C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:41:in `parse' 
C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:22:in `parse!' 
C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/bin/html2haml:7:in `<top (required)>' 
C:/Ruby/bin/html2haml:19:in `load' 
C:/Ruby/bin/html2haml:19:in `<main>' 

[NOTE] 
You may encounter a bug of Ruby interpreter. Bug reports are welcome. 
For details: http://www.ruby-lang.org/bugreport.html 


This application has requested the Runtime to terminate it in an unusual way. 
Please contact the application's support team for more information. 

然後紅寶石崩潰。 我已經重新安裝了所有的寶石,但沒有任何幫助。請幫我

回答

1

原來,hpricot_scan.sofast_xs.so有錯誤的文件結束自己編譯的寶石。它們應該是.dll而不是.so

+0

不正確,那些是Ruby C擴展,它的默認擴展名是.so以避免DLL衝突。 這個問題是我在我的評論中指出的:擴展與Ruby 1.8而不是1.9相關聯 – 2010-05-11 13:01:42

2

看起來像你安裝的hpricot gem缺少支持Ruby 1.9的二進制文件。所有包含預編譯C擴展名的Gem都與Ruby 1.8 1.9二進制文件鏈接,並且不可互換。

對點寶石作者的建議是建立所謂的胖二進制文件,它提供對Windows的1.8和1.9版本的Ruby的支持。

或者,您也可以安裝使用RubyInstaller二進制Ruby和使用Development Kit