Where is sqlite3?

I just went through the first demo in the AgileWeb Development with
Rails book, and it seems that a new dependency has broken the demo.

MissingSourceFile in SayController#hello

no such file to load -- sqlite3

RAILS_ROOT: /home/kenb/rails-projects/demo

I just used Synaptic to install package sqlite3 on my Ubuntu Gutsy
Gibbon system, and I now have a sqlite3 command. But that doesn't
change the behavior of the demo one bit. There is still a sqlite3
file missing.

I was wondering why Sqlite3 has been
chosen as the default for Rails 2.0.2. What does it have over MySQL to warrant
such a change?

The information contained in this email and any attached files is
confidential to BAE Systems Australia. If you are not the intended
recipient, any use, disclosure or copying of this email or any
attachments is expressly prohibited. If you have received this email
in error, please notify us immediately. VIRUS: Every care has been
taken to ensure this email and its attachments are virus free,
however, any loss or damage incurred in using this email is not the
sender's responsibility. It is your responsibility to ensure virus
checks are completed before installing any data sent in this email to
your computer."

The #1 reason is that you don’t need to do anything

With SQlite3…

rails myproject
cd myproject
ruby script/generate scaffold project name:string description:text estimated_hours:decimal
rake db:migrate

ruby script/server

There. You’re done. No creating permissions, users, databases, etc. No need to run an extra process (mysql) just to try something out. The database is a file, so its portable. I use it almost exclusively for the first phases of my projects because of its ease of use and portability. I recommend it highly and am just thrilled by the fact that it’s the new default.

Some may complain that there aren’t many good GUI tools for SQLite… but with migrations, tests, and script/console, that’s not an issue at all.

That’s my .02

Thanks Brian.

That’s interesting. I take it you
only use it for the early stages of development and then switch to something
like MySQL later?

Are there any changes you have to make to
your source code to accommodate the switch?



SQLite Manager 0.2.11 Homepage
by Mrinal Kant

Manage any SQLite database on your computer.

Manage any SQLite database on your computer. An intuitive heirarchical
tree showing database objects. Helpful dialogs to manage tables, indexes,
views and triggers. You can browse and search the tables, as well as add,
edit and delete the records. Facility to execute any sql query. A
dropdown menu helps with the sql syntax thus making writing sql easier.
Easy access to common operations through menu, toolbars, buttons and
context-menu. Export tables/views in csv or xml format



I spotted a Tk GUI recently too.

Most Rails developers would have been using Sqlite anyway in development
and test modes. Its really fast, and its also very easy to run sqlite in memory

And then move on the next of many riddles posed in trying to follow
AWDWR using Rails 2!

I am having sufficient trouble with sqlite3 that I have decided to
revert back to rails 1.2.6 for the time being, and wait for the 2.0.2
install, dependency, and configuration problems to sort themselves

So, let me pose a new question: How do I uninstall Rails 2.0.2?