Saturday, August 28, 2010

Installing sqlite3-ruby

[2011-08-21 OBSOLETE]

The ruby gem sqlite3-ruby has been renamed sqlite3.
The sqlite3-ruby is now just a dummy gem that depends on sqlite3.
(See here.)

See also my latest installation: "Installing SQLie3 for Ruby on Unbuntu 11.04"


1 Install libsqlite3 libraries.

a. Synaptic
b. Search and install
- libsqlite3-dev
- libsqllite3-ruby # ruby1.8
- libsqlite3-ruby1.9.1

2. Install ruby gem.
$ sudo gem install sqlite3-ruby
Building native extensions.  This could take a while...
Successfully installed sqlite3-ruby-1.3.1
1 gem installed
Installing ri documentation for sqlite3-ruby-1.3.1...
Enclosing class/module 'mSqlite3' for class Statement not known
No definition for libversion
Installing RDoc documentation for sqlite3-ruby-1.3.1...
Enclosing class/module 'mSqlite3' for class Statement not known
No definition for libversion
$ sudo gem1.9.1 install sqlite3-ruby
Building native extensions.  This could take a while...
Successfully installed sqlite3-ruby-1.3.1
1 gem installed
Installing ri documentation for sqlite3-ruby-1.3.1...
Updating class cache with 1723 classes...
Installing RDoc documentation for sqlite3-ruby-1.3.1...

3. Check the installation.
$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):003:0> require 'sqlite3'
=> true
irb(main):004:0> quit
$ irb1.9.1 
irb(main):001:0> require 'sqlite3'
=> true
irb(main):002:0> quit

No comments:

Post a Comment