开发者

Weird Haml 3 error with ruby 1.9.1 and rails 3

I'm getting this weird error on my windows 7 computer when I am using the html2haml command with Haml 3 and Rails on Ruby 1.9:

-- 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.

And then ruby crashes. I have reinstalled all the gems but nothing will help. Please help me


Looks like hpricot gem you have installed lack binaries to support Ruby 1.9. All Gem that contains C extensions pre-compiled are linked against Ruby 1.8 or 1.9 binaries, and are not interchangeable.

A recommendation to point gem authors is build what is know as fat-binaries which provide support for both 1.8 and 1.9 versions of Ruby on Windows.

Alternatively, you can install Ruby using RubyInstaller binaries and compile the gem yourself using the Development Kit


Turns out that the hpricot_scan.so and fast_xs.so have the wrong file ending. They should be .dll and not .so

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜