Please check the APress web site for code downloads, errata, etc.
APress web page for my book that also contains the code download link.
I have used Ruby 1.9.1 for much of my development since January 2009. Ruby 1.9.x does not require "require 'rubygems'" before requiring locally installed gem libraries. If you are using Ruby 1.8.x, and if any of my example programs fail to load gems that you have installed, then I probably did not put a "require 'rubygems'" at the top of the example source file - so, please add this statement and try re-running the example.
gem sources -a http://gems.github.com gem install scrubber-scrubyt
git clone git://github.com/davidx/jruby-lucene.git cd jruby-lucene gem build gem install jruby-lucene-*.gemThey should be:
git clone git://github.com/davidx/jruby-lucene.git cd jruby-lucene rake build gem install jruby-lucene-*.gemAlso: here, "gem" should be the JRuby gem, so unless the JRuby bin directory is before the Ruby bin directory on your path, you might want to use:
jruby -S gem install jruby-lucene-*.gemAlso, when running the interactive example, it may be required to require rubygems before jruby/lucene:
irb(main):002:0> require 'rubygems' => true irb(main):003:0> require 'jruby/lucene' => true
# with !, it creates the database if it doesn't already exist
db = CouchRest.database!("http://127.0.0.1:5984/test")
response = db.save_doc({'key 1' => 'value 1', 'key 2' => ..... })
For some versions of the gem, the method "save_doc" may be "save".