Information on Mark Watson's Book "Scripting Intelligence: Web 3.0 Information, Gathering and Processing"

Pair Programming
"Pair Programming"

Please check the APress web site for code downloads, errata, etc.

APress web page for my book that also contains the code download link.

General notes on Ruby 1.8.x vs. Ruby 1.9.x vs. JRuby compatibility:

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.

Corrections and comments on book material:

7/4/2009: Chapter 5: typo on page 98 and a correction to example program

In the middle of page 98, change two occurrences of "http::" to "http:". Also, in the test file redland_demo.rb, globally make this same edit.

6/7/2009: Chapter 10: Note on installing scRUBYt!

Make sure that you get Peter's version 0.4.11 from github, and not the released gem:
	gem sources -a http://gems.github.com
	gem install scrubber-scrubyt

6/5/2009: Chapter 9, "Using JRuby and Lucene"

The build instructions are listed as:
	git clone git://github.com/davidx/jruby-lucene.git 
	cd jruby-lucene 
	gem build 
	gem install jruby-lucene-*.gem 
They should be:
	git clone git://github.com/davidx/jruby-lucene.git 
	cd jruby-lucene 
	rake build 
	gem install jruby-lucene-*.gem 
Also: 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-*.gem 
Also, 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

Chapter 11: "Using CouchDB"

In the code example:
	# 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".