# SQlite3 hoopup issues on mac os x

**URL:** <https://www.ruby-forum.com/t/sqlite3-hoopup-issues-on-mac-os-x/76578>\
**Category:** Rails\
**Created:** [March 4, 2006, 7:07am UTC](https://www.ruby-forum.com/t/sqlite3-hoopup-issues-on-mac-os-x/76578 "2006-03-04T07:07:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Silas\_Hundt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8491ac/32.png) [@Silas\_Hundt](https://www.ruby-forum.com/u/Silas_Hundt)\
**Post date:** [March 4, 2006, 7:07am UTC](https://www.ruby-forum.com/t/sqlite3-hoopup-issues-on-mac-os-x/76578/1 "2006-03-04T07:07:31Z")

</div>

friends of the int-arweb.

what does this mean:

(in bold) ActiveRecord::StatementInvalid in Contact#create

SQLite3::SQLException: SQL logic error or missing database: INSERT  
INTO contacts

Context:  
this happened after I had finished setting up RoR as per the tutorial  
at [http://maczealots.com/tutorials/ruby-on-rails/](http://maczealots.com/tutorials/ruby-on-rails/)

the database, is like, there. is there a nice ruby command like deal  
to test if everything is hooked up correctly?

grough…  
thanks,  
-sjh

---

<div class="post-metadata">

**Author:** ![Silas\_Hundt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8491ac/32.png) [@Silas\_Hundt](https://www.ruby-forum.com/u/Silas_Hundt)\
**Post date:** [March 4, 2006, 7:22am UTC](https://www.ruby-forum.com/t/sqlite3-hoopup-issues-on-mac-os-x/76578/2 "2006-03-04T07:22:35Z")

</div>

On Mar 4, 2006, at 7:05, Silas Hundt wrote:

> Context:  
> this happened after I had finished setting up RoR as per the  
> tutorial at [http://maczealots.com/tutorials/ruby-on-rails/](http://maczealots.com/tutorials/ruby-on-rails/)
> 
> the database, is like, there. is there a nice ruby command like  
> deal to test if everything is hooked up correctly?

Can you paste config/database.yml and the output of

```
ls db

```

to make apparent everything looks fine?

– fxn

---

<div class="post-metadata">

**Author:** ![Silas\_Hundt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8491ac/32.png) [@Silas\_Hundt](https://www.ruby-forum.com/u/Silas_Hundt)\
**Post date:** [March 11, 2006, 11:42pm UTC](https://www.ruby-forum.com/t/sqlite3-hoopup-issues-on-mac-os-x/76578/3 "2006-03-11T23:42:58Z")

</div>

Interestingly, I have a similar problem. I can select from the  
database  
just fine, and insert into the database from the sqlite shell (i.e:  
sqlite\>…). But when I attempt to insert into the database from a  
form, in  
otherwords using  
ActiveRecord’s create method, I get the same error message as above,  
albeit  
different table.

per the requested information:

`ls db` yeilds  
datadef.sql dev.db prod.db test.db

`cat database.yml` yeilds  
development:  
adapter: sqlite3  
database: db/dev.db

test:  
adapter: sqlite3  
database: db/test.db

production:  
adapter: sqlite3  
database: db/prod.db

Once again, I can select both from rails and the sqlite shell, but only  
insert from the sqlite shell. I have not tried to update nor delete.

- thank you, Travis.

---

<div class="post-metadata">

**Author:** ![Silas\_Hundt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8491ac/32.png) [@Silas\_Hundt](https://www.ruby-forum.com/u/Silas_Hundt)\
**Post date:** [March 12, 2006, 9:49am UTC](https://www.ruby-forum.com/t/sqlite3-hoopup-issues-on-mac-os-x/76578/4 "2006-03-12T09:49:13Z")

</div>

Its a simple permission problem, make sure that your database can be  
written  
to by the webserver. duh.

---

<div class="post-metadata">

**Author:** ![Silas\_Hundt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8491ac/32.png) [@Silas\_Hundt](https://www.ruby-forum.com/u/Silas_Hundt)\
**Post date:** [March 28, 2006, 10:13am UTC](https://www.ruby-forum.com/t/sqlite3-hoopup-issues-on-mac-os-x/76578/5 "2006-03-28T10:13:26Z")

</div>

I’m having the same problem, using Rails set up using the directions  
here:

[http://tonyarnold.com/articles/2005/12/14/ruby-on-rails-1-0-installer](http://tonyarnold.com/articles/2005/12/14/ruby-on-rails-1-0-installer)

After dealing with all sorts of permission problems (had to give  
permission to the www user to access the tmp/sessions directory in the  
Rails app’s folder), trying to get a simple Rails app running, that I  
have in a folder in my desktop, when I try to update or create a  
record I get the same error.

I went so far as to set the permissions of the whole rails apps files  
and folders to 777, but that didn’t help.

---

<div class="post-metadata">

**Author:** ![Silas\_Hundt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8491ac/32.png) [@Silas\_Hundt](https://www.ruby-forum.com/u/Silas_Hundt)\
**Post date:** [March 28, 2006, 10:22am UTC](https://www.ruby-forum.com/t/sqlite3-hoopup-issues-on-mac-os-x/76578/6 "2006-03-28T10:22:01Z")

</div>

On 3/28/06, John T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m having the same problem, using Rails set up using the directions here:

…

> I went so far as to set the permissions of the whole rails apps files  
> and folders to 777, but that didn’t help.

Yeah, still a permissions problem. I set the permissions of the app’s  
folder to 777:

chmod 777 test

and restarted Apache and it started working.

There’s got to be a better way to serve an app out of a folder in my  
home directory without having to open the whole hierarchy wide open…

jt
