title: Installing hpricot for JRuby
body: <p>I'm trying to look at cucumber for Jruby on Rails. One of the pre-requesites is webrat which has as pre-requisite hpricot.</p>
  
  <p>I've installed the gem with hpricot using:</p>
  
  <p>gem install hpricot --source <a href="http://code.whytheluckystiff.net" rel="nofollow noreferrer">http://code.whytheluckystiff.net</a> --version 0.6.1 --platform java</p>
  
  <p>This installs the java version of hpricot. I add the hpricot_scan.jar to the CLASSPATH but when I run:</p>
  
  <pre><code>cucumber features -n
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>HpricotScanService.java:931:in `hpricot_scan': java.lang.NoSuchMethodError:
  org.jruby.runtime.builtin.IRubyObject.getInstanceVariable(Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
  from HpricotScanService.java:1324:in `__hpricot_scan'
  from null:-1:in `call'
  from InvocationCallback.java:67:in `execute'
  from FullFunctionCallbackMethod.java:69:in `call'
  from DynamicMethod.java:243:in `call'
  from CachingCallSite.java:283:in `cacheAndCall'
  from CachingCallSite.java:121:in `callBlock'
  </code></pre>
  
  <p>etc.</p>
  
  <p>If I compile the HpricotScanService.java file and add the resulting .class file to the classpath, I get:</p>
  
  <pre><code>Then I should see "Run"
  private method `scan' called for Hpricot:Module (NoMethodError)
  features/step_definitions/webrat_steps.rb:94:in `/^I should see "([^\"]*)"$/'
  features/manage_activity.feature:9:in `Then I should see "Run"'
  </code></pre>
  
  <p>If I try to install later versions of the hpricot, then I get:</p>
  
  <pre><code>ERROR: Failed to build gem native extension.
  C:/Program Files/Ruby/jruby-1.2.0/bin/../bin/jruby.bat extconf.rb install hpricot --platform java
  C:/Program Files/Ruby/jruby-1.2.0/bin/../lib/ruby/1.8/mkmf.rb:7: JRuby does not support native extensions. Check wiki.jruby.org for alternatives. (Not
  ImplementedError)
  from C:/Program Files/Ruby/jruby-1.2.0/bin/../lib/ruby/1.8/mkmf.rb:1:in `require'
  from extconf.rb:1
  </code></pre>
  
  <p>Does anyone have any clues as to what I'm doing wrong/not doing/where I'm being stupid.?</p>
  
  <p>Using Windows XP, JRuby 1.2.0</p>