Hi after many attempts to get the sqlite3 examples running ("unable to open database file:"), I found this: "sqlite3-ruby won?t even link against your libsqlite3 unless SWIG is installed." (http://www.baconbear.com/articles/2006/12/06/osx-sqlite3-and-rails) Anyone shed any light on this? I''m running it as a cgi app (no problem with Camping itself, just any apps that need sqlite3) under Apache, OS X 10.4.11... sqlite 3.1.3 (the one that comes with the system and OS X uses)? Dave Everitt
Regarding the post below: in case anyone was going to reply about SWIG, I checked and found this on the sqlite3-ruby GIT pages: "the gem ships with the C source-code pre-built, so (as of version 1.1.1) you no longer need to have SWIG installed." So my problem is obviously elsewhere... sqlite3 works fine, I''m using Ruby 1.8.6... will keep trying, unless anyone has helpful suggestions? I''m just getting my head around Camping, so it could well be me, somewhere... here''s my Gem list: activerecord (2.3.2) activesupport (2.3.2) acts_as_versioned (0.2.3) builder (2.1.2) camping (1.5) cgi_multipart_eof_fix (2.5.0) cheat (1.2.1) daemons (1.0.10) fastthread (1.0.7, 1.0.1) gem_plugin (0.2.3) innate (2009.05) markaby (0.5) metaid (1.0) mongrel (1.1.5) rack (1.0.0, 0.4.0) ramaze (2009.05, 2008.11) rubygems-update (1.3.3, 1.3.1) sources (0.0.1) sqlite3-ruby (1.2.4) I''m wary of updating sqlite 3.1.3 to 3.6.10, as OS X uses it... just need to know if Camping has a problem with sqlite 3.1.3? I don''t use ports, but happy to go /ursr/local. Dave Everitt> Hi > > after many attempts to get the sqlite3 examples running ("unable to > open database file:"), I found this: > > "sqlite3-ruby won?t even link against your libsqlite3 unless SWIG > is installed." > (http://www.baconbear.com/articles/2006/12/06/osx-sqlite3-and-rails) > > Anyone shed any light on this? > > I''m running it as a cgi app (no problem with Camping itself, just > any apps that need sqlite3) under Apache, OS X 10.4.11... sqlite > 3.1.3 (the one that comes with the system and OS X uses)? > > Dave Everitt
Weird. I''ve used sqlite3 on the SQLite which follows with 10.4 earlier. Could you paste the code you use to connect to the database? //Magnus Holm On Mon, May 18, 2009 at 11:22, Dave Everitt <deveritt at innotts.co.uk> wrote:> Regarding the post below: in case anyone was going to reply about SWIG, I > checked and found this on the sqlite3-ruby GIT pages: > > "the gem ships with the C source-code pre-built, so (as of version 1.1.1) > you no longer need to have SWIG installed." > > So my problem is obviously elsewhere... sqlite3 works fine, I''m using Ruby > 1.8.6... will keep trying, unless anyone has helpful suggestions? I''m just > getting my head around Camping, so it could well be me, somewhere... here''s > my Gem list: > > activerecord (2.3.2) > activesupport (2.3.2) > acts_as_versioned (0.2.3) > builder (2.1.2) > camping (1.5) > cgi_multipart_eof_fix (2.5.0) > cheat (1.2.1) > daemons (1.0.10) > fastthread (1.0.7, 1.0.1) > gem_plugin (0.2.3) > innate (2009.05) > markaby (0.5) > metaid (1.0) > mongrel (1.1.5) > rack (1.0.0, 0.4.0) > ramaze (2009.05, 2008.11) > rubygems-update (1.3.3, 1.3.1) > sources (0.0.1) > sqlite3-ruby (1.2.4) > > I''m wary of updating sqlite 3.1.3 to 3.6.10, as OS X uses it... just need > to know if Camping has a problem with sqlite 3.1.3? I don''t use ports, but > happy to go /ursr/local. > > Dave Everitt > > Hi >> >> after many attempts to get the sqlite3 examples running ("unable to open >> database file:"), I found this: >> >> "sqlite3-ruby won?t even link against your libsqlite3 unless SWIG is >> installed." >> (http://www.baconbear.com/articles/2006/12/06/osx-sqlite3-and-rails) >> >> Anyone shed any light on this? >> >> I''m running it as a cgi app (no problem with Camping itself, just any apps >> that need sqlite3) under Apache, OS X 10.4.11... sqlite 3.1.3 (the one that >> comes with the system and OS X uses)? >> >> Dave Everitt >> > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20090518/1af6ce2d/attachment.html>
Many attempts (3 days now) to get even a single sqlite3 example running... I''ve got a little further by creating the database file from the sqlite3 shell. Now the app connects to an empty db and I get: ActiveRecord::StatementInvalid SQLite3::SQLException: no such table: blogtiny_posts: SELECT * FROM "blogtiny_posts" : I am I right to expect that Camping will create the necessary tables when run as CGI?> Weird. I''ve used sqlite3 on the SQLite which follows with 10.4 > earlier. Could you paste the code you use to connect to the database? > > //Magnus Holm > >> I''m running it as a cgi app (no problem with Camping itself, just >> any apps that need sqlite3) under Apache, OS X 10.4.11... sqlite >> 3.1.3 (the one that comes with the system and OS X uses)? >> >> Dave Everitt
In order to create the necessary tables you''ll have to run Blogtiny::Models.create_schema. The prefered way is define a create-method like this: def Blogtiny.create Blogtiny::Models.create_schema end All servers or setups using Camping should then call Blogtiny.create on startup after the app is loaded (so yes, you still have to call this yourself). //Magnus Holm On Mon, May 18, 2009 at 16:35, Dave Everitt <deveritt at innotts.co.uk> wrote:> Many attempts (3 days now) to get even a single sqlite3 example running... > I''ve got a little further by creating the database file from the sqlite3 > shell. Now the app connects to an empty db and I get: > > ActiveRecord::StatementInvalid SQLite3::SQLException: no such table: > blogtiny_posts: SELECT * FROM "blogtiny_posts" : > > I am I right to expect that Camping will create the necessary tables when > run as CGI? > > Weird. I''ve used sqlite3 on the SQLite which follows with 10.4 earlier. >> Could you paste the code you use to connect to the database? >> >> //Magnus Holm >> >> I''m running it as a cgi app (no problem with Camping itself, just any >>> apps that need sqlite3) under Apache, OS X 10.4.11... sqlite 3.1.3 (the one >>> that comes with the system and OS X uses)? >>> >>> Dave Everitt >>> >> _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20090519/4c41c304/attachment.html>