List Info

Thread: rdflite problem with Rails




rdflite problem with Rails
user name
2007-09-25 17:08:53
Hi All,

I am having a problem getting the RDF Lite adapter to work in Windows. It is similar to the one fixed by Eyal in [1], but the fix isn't working for me when in the Rails environment.

Here are the relevant stats:

Sqlite3 version: 3.5.0
sqlite3 binary: in my PATH
sqlite3 DLL * .def: in c:windowssystem32
Gems installed: all the latest needed

The example on the Wiki runs just fine:

require 'rubygems'
require 'active_rdf'
adapter = ConnectionPool.add_data_source :type => :rdflite
adapter.load "./test_person_data.nt";
..etc

But when I place similar code in the environment.rb file of my Rails app, the app dies when I try to add the data source. The message is:

c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-mswin32/lib/sqlite3/errors.rb:94:in `check';: near "not": syntax error (SQLite3::SQLException)
       ; from c:/ruby/lib/ruby/gems/1.8/gems/sqlite3- ruby-1.2.1-mswin32/lib/sqlite3/statement.rb:71:in `initialize'
        from c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-mswin32/lib/sqlite3/database.rb:184:in `new'
  ;      from c:/ruby/lib/ruby/gems/1.8/gems/sqlite3- ruby-1.2.1-mswin32/lib/sqlite3/database.rb:184:in `prepare'
     ;   from c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-mswin32/lib/sqlite3/database.rb:211:in `execute'
     ;   from c:/ruby/lib/ruby/gems/1.8/gems/activerdf_rdflite- 1.4/lib/activerdf_rdflite/rdflite.rb:70:in `initialize'
        from D:/Workspace/garcon/webclient/vendor/gems/activerdf-1.6.3/lib/active_rdf/federation/connection_pool.rb:123:in `new'
  ;      from D:/Workspace/garcon/webclient/vendor/gems/activerdf- 1.6.3/lib/active_rdf/federation/connection_pool.rb:123:in `send'
        from D:/Workspace/garcon/webclient/vendor/gems/activerdf-1.6.3/lib/active_rdf/federation/connection_pool.rb:123:in `create_adapter'
  ;       ... 28 levels...
        from ./script/../config/../vendor/rails/railties/lib/commands/server.rb:39
   ;     from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
 ;       from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
 ;       from script/server:3

Has anyone seen this happen only in Rails before or have any ideas?

Thanks a lot for your help,
Ted

[1 ]http://lists.deri.org/pipermail/activerdf/2006-November/000150.html

--
Edward Benson
http://www.edwardbenson.com/
Re: rdflite problem with Rails
user name
2007-09-26 01:52:14
On 26.09.2007, at 00:08, Edward Benson wrote:

> I am having a problem getting the RDF Lite adapter to
work in  
> Windows. It is similar to the one fixed by Eyal in [1],
but the fix  
> isn't working for me when in the Rails environment.
>
> Here are the relevant stats:
>
> Sqlite3 version: 3.5.0
> sqlite3 binary: in my PATH
> sqlite3 DLL * .def: in c:windowssystem32
> Gems installed: all the latest needed


Please try it again with sqlite3 version 3.3.x .

As documented in the "getting started guide" [1]
other versions of  
sqlite3 are known to not work (on windows) with rdflite,
because of  
API changes in sqlite3. This might require compiling sqlite
from  
source, but the guide has all the instructions, although you
might  
want to get ready for a challenge or two.

[1] http://
wiki.activerdf.org/GettingStartedGuide


_______________________________________________
ActiveRDF mailing list
ActiveRDFlists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )