Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need to compile a patched sqlite3-ruby any more #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,21 @@ To build Geocoder::US, you will need gcc/g++, make, bash or equivalent, the
standard *NIX 'unzip' utility, and the SQLite 3 executable and development
files installed on your system.

This should work on Ubuntu LTE 12

sudo apt-get update
sudo apt-get install -y build-essential sqlite3 libsqlite3-dev flex bison unzip
gem install sqlite3

git clone https://github.com/geocommons/geocoder.git
cd geocoder
make
sudo make install


To use the Ruby interface, you will need the 'Text' gem installed from
rubyforge. To run the tests, you will also need the 'fastercsv' gem.

Additionally, you will need a custom build of the 'sqlite3-ruby' gem that
supports loading extension modules in SQLite. You can get a patched version of
this gem from http://github.com/schuyler/sqlite3-ruby/. Until the sqlite3-ruby
maintainers roll in the relevant patch, you will need *this* version.

*NOTE*: If you do not have /usr/include/sqlite3ext.h installed, then your
sqlite3 binaries are probably not configured to support dynamic extension
loading. If not, you *must* compile and install SQLite from source, or rebuild
Expand All @@ -76,6 +83,9 @@ the system-installed version), using `which sqlite3`. Also, be sure that you've
added your source install prefix (usually /usr/local) to /etc/ld.so.conf (or
its moral equivalent) and that you've run /sbin/ldconfig.




== Thread safety

SQLite 3 is not designed for concurrent use of a single database handle across
Expand Down Expand Up @@ -185,12 +195,12 @@ file, and then it renames the new database over top of the old.

From within the source tree, you can run the following:

$ ruby tests/run.rb
$ ruby test/run.rb

This tests the libraries, except for the database routines. If you have a
database built, you can run the test harness like so:

$ ruby tests/run.rb /opt/tiger/geocoder.db
$ ruby test/run.rb /opt/tiger/geocoder.db

The full test suite may take 30 or so seconds to run completely.

Expand Down