Reputation: 31
I'm trying to get a stand-alone jar file of a Ruby application that uses Nokogiri.
I have a Gemfile that looks like this:
source :rubygems
gem 'nokogiri'
and in bin/jartest.rb I have this:
require 'rubygems'
require 'nokogiri'
puts "Hello world"
When I run:
jruby bin/jartest.rb
everything works great, but when I run
warble; java -jar jartest.jar
I get:
LoadError: no such file to load -- isorelax
I found "Question on Warbler and Nokogiri", but I don't know where to find those jar files and I don't really want to have them in my lib directory if I can help it. Really I just want to get it working.
dan$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
dan$ gem list | grep nokogiri
nokogiri (1.5.5, 1.5.0, 1.4.4)
Upvotes: 3
Views: 1101
Reputation: 181
Make sure that you've installed the Java version of Nokogiri instead of the native version:
> gem list noko
nokogiri (1.5.0)
> gem install nokogiri Successfully
installed nokogiri-1.5.0-java
1 gem installed
> gem list noko
nokogiri (1.5.0 java)
Upvotes: 0