Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Where is sqlite3?

32 views
Skip to first unread message

explainer

unread,
Dec 17, 2007, 8:31:23 PM12/17/07
to Ruby on Rails: Talk
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

Ryan Bigg

unread,
Dec 17, 2007, 8:38:11 PM12/17/07
to rubyonra...@googlegroups.com
Ahh! You seem to be the first person on this list to run across that wonderful new feature of Rails 2.0.2! Rails 2.0.2 doesn't use MySQL by default, but instead sqlite3.

You can install it by doing something like apt-get install sqlite3 or by using your favourite package manager.

explainer

unread,
Dec 17, 2007, 8:46:36 PM12/17/07
to Ruby on Rails: Talk
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.

On Dec 17, 5:38 pm, "Ryan Bigg" <radarliste...@gmail.com> wrote:
> Ahh! You seem to be the first person on this list to run across that
> wonderful new feature of Rails 2.0.2! Rails 2.0.2 doesn't use MySQL by
> default, but instead sqlite3.
>
> You can install it by doing something like apt-get install sqlite3 or by
> using your favourite package manager.
>
> On Dec 18, 2007 12:01 PM, explainer <keburg...@gmail.com> wrote:
>
>
>
> > 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
>
> --
> Ryan Bigghttp://www.frozenplague.net

Ryan Bigg

unread,
Dec 17, 2007, 8:47:16 PM12/17/07
to rubyonra...@googlegroups.com
Interesting. Try gem install sqllite3?

Ryan Bigg

unread,
Dec 17, 2007, 8:48:01 PM12/17/07
to rubyonra...@googlegroups.com
Wondering when I was going to make that typo, it's sqlite-ruby or sqlite3-ruby. Those are the gems you want to install.

JUDD, John

unread,
Dec 17, 2007, 9:00:30 PM12/17/07
to rubyonra...@googlegroups.com

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?

"Warning:
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."

Brian Hogan

unread,
Dec 17, 2007, 11:51:26 PM12/17/07
to rubyonra...@googlegroups.com
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

JUDD, John

unread,
Dec 18, 2007, 1:21:22 AM12/18/07
to rubyonra...@googlegroups.com

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?

 

Cheers

 

John

 


Thufir

unread,
Dec 18, 2007, 2:43:51 AM12/18/07
to rubyonra...@googlegroups.com
On Mon, 17 Dec 2007 22:51:26 -0600, Brian Hogan wrote:


> 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.


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


<https://addons.mozilla.org/en-US/firefox/addon/5817>

-Thufir

Richard Conroy

unread,
Dec 18, 2007, 4:55:47 AM12/18/07
to rubyonra...@googlegroups.com
On Dec 18, 2007 7:43 AM, Thufir <hawat....@gmail.com> wrote:
>
> On Mon, 17 Dec 2007 22:51:26 -0600, Brian Hogan wrote:
>
>
> > 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.
>
>
> SQLite Manager 0.2.11 Homepage
> by Mrinal Kant

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
too.

Rick DeNatale

unread,
Dec 18, 2007, 10:48:35 AM12/18/07
to rubyonra...@googlegroups.com
On 12/17/07, Ryan Bigg <radarl...@gmail.com> wrote:
> On Dec 18, 2007 12:01 PM, explainer <kebu...@gmail.com> wrote:
> >
> > 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.
> Ahh! You seem to be the first person on this list to run across that
> wonderful new feature of Rails 2.0.2! Rails 2.0.2 doesn't use MySQL by
> default, but instead sqlite3.
>
> You can install it by doing something like apt-get install sqlite3 or by
> using your favourite package manager.

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

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

explainer

unread,
Dec 18, 2007, 4:56:30 PM12/18/07
to Ruby on Rails: Talk
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
out.

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

On Dec 18, 7:48 am, "Rick DeNatale" <rick.denat...@gmail.com> wrote:
> On 12/17/07, Ryan Bigg <radarliste...@gmail.com> wrote:
>
> > On Dec 18, 2007 12:01 PM, explainer <keburg...@gmail.com> wrote:
>
> > > 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.
> > Ahh! You seem to be the first person on this list to run across that
> > wonderful new feature of Rails 2.0.2! Rails 2.0.2 doesn't use MySQL by
> > default, but insteadsqlite3.
>
> > You can install it by doing something like apt-get installsqlite3or by

Ryan Bigg

unread,
Dec 18, 2007, 5:39:48 PM12/18/07
to rubyonra...@googlegroups.com
You can change the adapter in the database.yml from adapter: sqlite to adapter: mysql and then use mysql on Rails 2.0.2

Vin Wo

unread,
Dec 18, 2007, 6:40:24 PM12/18/07
to rubyonra...@googlegroups.com


I've actually written a post regarding some help for beginners who just
started using the book with Rails 2.0. The short answer, if you don't
want to read through my post is to use the command

rails -d mysql depot

Check out the details at
http://woonzai.com/blog/2007/12/18/help-for-rails-beginners-using-the-book-awdwr-and-rails-20/
--
Posted via http://www.ruby-forum.com/.

Reply all
Reply to author
Forward
0 new messages