views:

27

answers:

1

Has anyone here ever encountered the following error after installing and attempting to run the Geocommons geocoder on Mac OS X 10.5.8? This is my exact output from the Terminal window from the point at which I started irb:

$ irb
>> require 'geocoder/us'
=> true
>> db = Geocoder::US::Database.new("/opt/tiger/orangeca.db")
=> #<Geocoder::US::Database:0x57ac10 @threadsafe=false, @db=#<SQLite3::Database:0x57ab98>, @debug=false, @st={}>
>> p db.geocode("Disneyland Anaheim, CA 92802")
NoMethodError: undefined method `set_result' for #<SQLite3::Database::FunctionProxy:0x576778>
from /Library/Ruby/Gems/1.8/gems/Geocoder-US-2.0.0/lib/geocoder/us/database.rb:64:in `tune'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.0/lib/sqlite3/database.rb:316:in `call'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.0/lib/sqlite3/database.rb:316:in `create_function'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.0/lib/sqlite3/resultset.rb:66:in `call'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.0/lib/sqlite3/resultset.rb:66:in `step'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.0/lib/sqlite3/resultset.rb:66:in `next'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.0/lib/sqlite3/resultset.rb:97:in `each'
from /Library/Ruby/Gems/1.8/gems/Geocoder-US-2.0.0/lib/geocoder/us/database.rb:138:in `execute_statement'
from /Library/Ruby/Gems/1.8/gems/Geocoder-US-2.0.0/lib/geocoder/us/database.rb:46:in `synchronize'
from /Library/Ruby/Gems/1.8/gems/Geocoder-US-2.0.0/lib/geocoder/us/database.rb:46:in `synchronize'
from /Library/Ruby/Gems/1.8/gems/Geocoder-US-2.0.0/lib/geocoder/us/database.rb:135:in `execute_statement'
from /Library/Ruby/Gems/1.8/gems/Geocoder-US-2.0.0/lib/geocoder/us/database.rb:122:in `execute'
from /Library/Ruby/Gems/1.8/gems/Geocoder-US-2.0.0/lib/geocoder/us/database.rb:151:in `places_by_zip'
from /Library/Ruby/Gems/1.8/gems/Geocoder-US-2.0.0/lib/geocoder/us/database.rb:339:in `find_candidates'
from /Library/Ruby/Gems/1.8/gems/Geocoder-US-2.0.0/lib/geocoder/us/database.rb:654:in `geocode_address'
from /Library/Ruby/Gems/1.8/gems/Geocoder-US-2.0.0/lib/geocoder/us/database.rb:724:in `geocode'
from (irb):3>>  

Incidentally, "orangeca.db" is the TIGER/Line data for Orange County, CA - I downloaded only it from the main Census database rather than the entire US dataset because I'm merely testing Geocoder's usefulness for a piece of software I want to write and I didn't want to spend 10 hours downloading several GB of data which I might not end up using in the final product anyway.

My best guesses at explaining this behavior, based on information I found on the SQLite3::Database::FunctionProxy class, are as follows:

  1. My SQLite3 is installed correctly but something is incorrectly configured such that my Geocoder is not finding set_result as desired.
  2. My SQLite3 is incorrectly installed, but I am not sure where I went wrong in setting it up.

If anyone could offer any help with this, I would greatly appreciate it. Thank you in advance for your help!

A: 

Try using this version of the Sqlite Ruby Gem: http://github.com/schuyler/sqlite3-ruby

wonderchook
I thought that I already did - did you use any special options while installing it?
Steven D.
How did you install SQLite3? From source or using Macports?
wonderchook
I installed the original SQLite3 from source by downloading sqlite-amalgamation-3.6.23.1.tar.gz from http://www.sqlite.org/download.html and proceeding from there.I obtained Schuyler's patched SQLite Ruby Gem, on the other hand, using RubyGems (i.e. typing 'sudo gem install sqlite3-ruby' in Terminal).
Steven D.