Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 78744
BY: Chris Baker (chrisbaker97)
DATE: 2009-05-24 14:48
SUBJECT: gem Install - Choosing sqlite3 version bound?

 

I’m running OS X Leopard 10.5.7 and XCode 3.1.2. The stock sqlite3 is 3.4.0, but the most recent version installed by macports is 3.6.14.1. Testing returns the following:

$ which -a sqlite3
/opt/local/bin/sqlite3
/usr/bin/sqlite3

$ /opt/local/bin/sqlite3 --version
3.6.14.1

$ /usr/bin/sqlite3 --version
3.4.0

However, when I run the Ruby script below (using sqlite3-ruby version 1.2.4) it returns sqlite3 version 3.4.0 still:

# dbcheck.rb
require 'rubygems'
require 'sqlite3'
tempname = "test.sqlite#{3+rand}"
db = SQLite3::Database.new(tempname)
puts db.execute('select sqlite_version()')
db.close
File.unlink(tempname)

$ ruby dbcheck.rb
3.4.0

Without success, I’ve tried various incantations:

$ sudo gem install sqlite3-ruby
$ sudo gem install sqlite3-ruby -- --with-sqlite-dir=/opt/local
$ sudo gem install sqlite3-ruby -- --with-sqlite-dir=/opt/local/bin

Is there a way to get sqlite3-ruby correctly bound to the version of sqlite3 installed in /opt/local/bin?

Thanks!


Thread View

Thread Author Date
gem Install - Choosing sqlite3 version bound?Chris Baker2009-05-24 14:48

Post a followup to this message