Forum: Ruby on Rails SQLite3::SQLException: unable to open database file

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
67259181b4d628f350f5edfafcea6520?d=identicon&s=25 serenobs (Guest)
on 2009-04-26 00:26
(Received via mailing list)
I was trying to code same as the rails guide : getting started.
I could follow steps to 6.3 Working with Posts in the Browser.
(setting home page, creating a resource, running a migration)

After clicked create button, errors are occured.
SQLite3::SQLException: unable to open database file: INSERT INTO
"posts" ("name", "created_at", "title", "updated_at", "content") VALUES
('123123123', '2009-04-25 22:23:51', '12312312', '2009-04-25
22:23:51', '4123123123')

There is a db file at db folder named development.sqlite3
what's wrong with me?
Somebody help me, please.

Thanks in advance.
54404bcac0f45bf1c8e8b827cd9bb709?d=identicon&s=25 7stud -- (7stud)
on 2009-04-26 02:56
serenobs wrote:
> There is a db file at db folder named development.sqlite3

What does it say?
54404bcac0f45bf1c8e8b827cd9bb709?d=identicon&s=25 7stud -- (7stud)
on 2009-04-26 03:08
serenobs wrote:
> what's wrong with me?
> Somebody help me, please.

Also, looking over the directions in the guide, this part is plain

3.3.1 Configuring a SQLite Database

If you don’t have any database set up, SQLite is the easiest to get
installed. If you’re on OS X 10.5 or greater on a Mac, you already have
it. Otherwise, you can install it using RubyGems:

$ gem install sqlite3-ruby

That does not install sqlite3.  That installs a ruby interface to a
pre-existing installation of sqlite3.  In other words, that gem provides
the means for ruby to talk to sqlite3.  As the guide says at the

1 This Guide Assumes

This guide is designed for beginners who want to get started with a
Rails application from scratch. It does not assume that you have any
prior experience with Rails. However, to get the most out of it, you
need to have some prerequisites installed:

The Ruby language
The RubyGems packaging system
A working installation of SQLite (preferred), MySQL, or PostgreSQL

Did you have a working installation of SQLite installed before you
started reading the guide?
67259181b4d628f350f5edfafcea6520?d=identicon&s=25 serenobs (Guest)
on 2009-04-26 17:09
(Received via mailing list)
Of course ruby, ruby gems and sqlite3 are installed on my system
(CentOS 5.3)

#gem install sqlite3-ruby
Building native extensions.  This could take a while...
Successfully installed sqlite3-ruby-1.2.4
1 gem installed
Installing ri documentation for sqlite3-ruby-1.2.4...
Installing RDoc documentation for sqlite3-ruby-1.2.4..

it is installed properly, isn't it?
I can execute irb shell(ruby), sqlite3.

On Apr 26, 10:08 am, 7stud -- <>
E390077c0f489f08f6c12e403848d0c6?d=identicon&s=25 Rainer (Guest)
on 2009-04-26 20:14
(Received via mailing list)
On Apr 26, 12:25 am, serenobs <> wrote:
> There is a db file at db folder named development.sqlite3
> what's wrong with me?
> Somebody help me, please.
Did your migration complete successfully? i.e. does the table posts
exist in your database?
Does your database.yml file point to your db file -
development.sqlite3? It should look something like this:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000
42292bf8a0acbc98862d9306b501275d?d=identicon&s=25 Daniel Waite (rabbitcreative)
on 2009-08-24 19:48
serenobs wrote:
> SQLite3::SQLException: unable to open database file...

Me thinks it's a permissions issue...
This topic is locked and can not be replied to.