2012-04-19 29 views
0

更新:此問題已使用相關DevKitRubyInstaller固定。請參閱下面的答案。紅寶石:角度來說,Hpricot問題 - rb_hash_lookup不能位於MSVCRT-ruby18.dll


在新的WinXP,我們正在努力建立的回報率。我們在運行rails應用程序時遇到了一些問題。調試Hpricot寶石被發現是罪魁禍首。如果我們在一個簡單的Ruby程序中使用Hpricot,會發生同樣的問題。當我們運行其中使用角度來說,Hpricot任何Ruby程序與下面的消息會出現

一個消息框:

The procedure entry point rb_hash_lookup could not be located in the dynamic link library msvcrt-ruby18.dll. 

這裏是堆棧跟蹤:

C:/Ruby/lib/ruby/gems/1.8/gems/hpricot-0.8.6-x86-mswin32/lib/hpricot_scan/1.8/hpricot_scan.so: 127: The specified procedure could not be found. 
- C:/Ruby/lib/ruby/gems/1.8/gems/hpricot-0.8.6-x86-mswin32/lib/hpricot_scan/1.8/hpricot_scan.so (LoadError) 
     from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
     from C:/Ruby/lib/ruby/gems/1.8/gems/hpricot-0.8.6-x86-mswin32/lib/hpricot_scan.rb:1 
     from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
     from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
     from C:/Ruby/lib/ruby/gems/1.8/gems/hpricot-0.8.6-x86-mswin32/lib/hpricot.rb:20 
     from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' 
     from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' 
     from hp_test.rb:3 

紅寶石:紅寶石1.8.6 (2008-08-11 PATCHLEVEL 287)[I386-mswin32]

紅寶石寶石:1.3.2

Hpricot:0.8.6(它被安裝using gem install hpricot沒有任何問題)

任何線索?

謝謝。

+0

Hpricot是棄用軟件。你應該考慮使用nokogiri。 – pguardiario 2012-04-19 13:59:22

+0

這是一年的生產,所以搬到nokogiri現在不是一個選項。可能稍晚一些。感謝您的建議。 – Saim 2012-04-19 14:30:03

回答

0

Ruby DevKit是這裏的救助者。感謝Charlas

我們所做的是:

1. Uninstalled the ruby 
2. Installed it again using RubyInstaller 
3. Installed the DevKit 
4. Install the hpricot gem 
5. That's it 
0

您需要另一個角度來說,Hpricot:0.6.164是確定的,而0.8.6則不是。 後者可能意味着1.8.7+的紅寶石。