Forum: Ruby on Rails SQlite3 hoopup issues on mac os x

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Silas Hundt (Guest)
on 2006-03-04 08:07
(Received via mailing list)
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/

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

grough...
thanks,
-sjh
Xavier N. (Guest)
on 2006-03-04 08:22
(Received via mailing list)
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/
>
> 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
travis michel (Guest)
on 2006-03-12 00:42
(Received via mailing list)
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.
travis michel (Guest)
on 2006-03-12 10:49
(Received via mailing list)
Its a simple permission problem, make sure that your database can be
written
to by the webserver.  duh.
John T. (Guest)
on 2006-03-28 12:13
(Received via mailing list)
I'm having the same problem, using Rails set up using the directions
here:

<http://tonyarnold.com/articles/2005/12/14/ruby-on-...

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.
John T. (Guest)
on 2006-03-28 12:22
(Received via mailing list)
On 3/28/06, John T. <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
This topic is locked and can not be replied to.