projecthydra/om — pull request #45 by mbklein (2014-02-26 16:31:19+00:00)
Title: Fixes for JRuby compatibility

These changes will prepare OM for full JRuby compatibility, but will depend on sparklemotion/nokogiri#1054, sparklemotion/nokogiri#1056, and sparklemotion/nokogiri#1057 being accepted and merged. For now, there is a merged combo of all three of those at [mbklein/nokogiri@om-fixes](https://github.com/mbklein/nokogiri/tree/om-fixes). It won't install automatically from within bundler, but you can do the following:

1. `git clone https://github.com/mbklein/nokogiri.git nokogiri-om`
2. `cd nokogiri-om`
3. `git checkout om-fixes`
4. Tell your ruby version manage to use jruby (I use `rbenv shell jruby-1.7.9`)
5. `rake compile` (and ignore all the warnings - as long as the last line of output starts with `install -c` you're good to go)
6. cd to your om source directory
7. Edit om's `Gemfile` and add `gem 'nokogiri', :path => '/path/to/nokogiri-om'`
8. Do whatever you did in Step 4 to activate jruby
9. `bundle install`
10. `bundle exec rake spec`

You can also `rake compile` nokogiri under MRI, and then re-do the steps 9 and 10 under MRI, to verify that these changes (both to OM and nokogiri) don't break anything that already worked.