[Activerdf] SQL syntax error setting up rails + activerdf + sqllite
Lee Feigenbaum
feigenbl at us.ibm.com
Tue Nov 21 00:44:06 GMT 2006
Hi everyone,
I'm trying to get started to play around with ActiveRDF in a rails
context. When I run ruby script/generate controller Test, I'm getting this
error:
/home/figtree/.gems/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb:94:in
`check': near "not": syntax error (SQLite3::SQLException)
from
/home/figtree/.gems/gems/sqlite3-ruby-1.1.0/lib/sqlite3/statement.rb:71:in
`initialize'
from
/home/figtree/.gems/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:183:in
`new'
from
/home/figtree/.gems/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:183:in
`prepare'
from
/home/figtree/.gems/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:210:in
`execute'
from
/home/figtree/.gems/gems/activerdf_rdflite-1.0/lib/activerdf_rdflite/rdflite.rb:73:in
`initialize'
from
/home/figtree/.gems/gems/activerdf-1.0/lib/active_rdf/federation/connection_pool.rb:110:in
`new'
from
/home/figtree/.gems/gems/activerdf-1.0/lib/active_rdf/federation/connection_pool.rb:110:in
`send'
from
/home/figtree/.gems/gems/activerdf-1.0/lib/active_rdf/federation/connection_pool.rb:110:in
`create_adapter'
... 6 levels...
from
/home/figtree/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/home/figtree/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
from script/generate:3
Printing out the SQL that's causing this error shows:
create table if not exists triple(s,p,o, unique(s,p,o) on conflict
ignore)
Some more info:
garth:~ 57>ruby -v
ruby 1.8.2 (2005-04-11) [i386-linux]
garth:~ 58>rails -v
Rails 1.1.6
[snipped for relevant parts]
garth:~ 66>gem list --local
*** LOCAL GEMS ***
activerdf (1.0)
Offers object-oriented access to RDF (with adapters to several
datastores).
activerdf_rdflite (1.0)
an RDF database for usage in ActiveRDF (based on sqlite3)
sqlite3-ruby (1.1.0)
SQLite3/Ruby is a module to allow Ruby scripts to interface with a
SQLite3 database.
Any idea what's up? Should I file a bug? (Figure I'd post here while
waiting for my launchpad registration email to arrive, in any case.)
thanks!
Lee
PS -- When I installed the activerdf gems on my DreamHost account using a
local gems install, something went screwy with the rdoc installation such
that I don't seem to have any docs for the activerdf classes and rdflite
adaptor. Is this available online somewhere?
PPS -- http://sw.deri.org/wiki/ActiveRDF/rdfbasics explains how Active RDF
uses existing seed data to figure out what predicates are intended when
coding with abbreviations. I had thought that a previous version of Active
RDF could learn the available predicates from an RDFS or OWL vocabulary.
Was this ever the case? Is it still the case? If so, are there any
examples or documentation of this?
More information about the Activerdf
mailing list