0

Update: This issue has been fixed using the RubyInstaller and related DevKit. Please see the answer below.


On a new WinXP we are trying to setup RoR. We were having some issue making the rails application run. While debugging Hpricot gem was found the culprit. The same issue happens if we use the Hpricot in a simple Ruby program.

A message box appears with the following message when we run any Ruby program which is using Hpricot:

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

And here is the stack trace:

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

Ruby: ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

Ruby Gems: 1.3.2

Hpricot: 0.8.6 (it was installed using gem install hpricot without any issue)

Any clue?

Thanks.

Saim
  • 2,471
  • 5
  • 30
  • 43
  • Hpricot is abandonware. You should consider using nokogiri instead. – pguardiario Apr 19 '12 at 13:59
  • This is production for a year, so moving to nokogiri is not an option for now. May be sometime later. Thanks for your suggestion. – Saim Apr 19 '12 at 14:30

2 Answers2

0

Ruby DevKit was the rescuer here. Thanks to Charlas.

What we did is:

1. Uninstalled the ruby
2. Installed it again using RubyInstaller
3. Installed the DevKit
4. Install the hpricot gem
5. That's it
Community
  • 1
  • 1
Saim
  • 2,471
  • 5
  • 30
  • 43
0

You need another hpricot: 0.6.164 is ok, while 0.8.6 is not. The latter might be meant for the 1.8.7+ ruby.

minger
  • 1