Sunday, August 21, 2011

Installing SQLite3 for Ruby on Ubuntu 11.4

Install SQL commandline interface and interface library for Ruby 1.9.1


1. Resources.

SQLite Home Page: http://www.sqlite.org/

2. Install SQLite3 Libraries and a commandline interface.

Open Synaptic Package Manager
Find and install the following:
-- sqlite3
-- libsqlite3-ruby1.9.1
-- libsqlite3-dev



3.Test sqlite3 commandline interface.

$ sqlite3 --version
3.7.4

4. Install sqlite3 gem.

Note that sqlite3-ruby is now obsolete. The sqlite3-ruby is now called "sqlite3". The sqlite3-ruby is now a dummy gem that depends on sqlite3. (See here.)

$ sudo gem install sqlite3
Building native extensions.  This could take a while...
Successfully installed sqlite3-1.3.4
1 gem installed
Installing ri documentation for sqlite3-1.3.4...
Installing RDoc documentation for sqlite3-1.3.4...
Test the gem installation.
$ irb
irb(main):001:0> require 'sqlite3'
=> true
irb(main):002:0> exit


No comments:

Post a Comment