[Activerdf] Rails and ActiveRDF

Ingo Paulsen paulseni at uni-duesseldorf.de
Tue Aug 29 15:43:02 IST 2006


Hi,

> On 08/29/06/08/06 12:08 +0200, Ingo Paulsen wrote:
>> My ruby module path is /usr/local/lib/ruby/1.8 (Mac OS X 10.4.7,  
>> Ruby  1.8.5). I copied faceted.rb into this path and also the src  
>> directory  like so:
>>
>> /usr/local/lib/ruby/1.8/faceted.rb
>> /usr/local/lib/ruby/1.8/src
> I'm not sure where faceted.rb comes from? Or did you mean faceteer.rb?

Yes, of course faceteer.rb instead of faceted.rb.

> The way I usually set this up is the following:
> Check out faceteer-engine directory somewhere, say
> /home/eyal/faceteer-engine
>
> Then put a symlink to faceteer-engine/faceteer.rb in /usr/lib/ruby/ 
> 1.8:
> /usr/lib/ruby/1.8/faceteer.rb -> /home/eyal/faceteer-engine/ 
> faceteer.rb
>
> Then ruby can find faceteer.rb (because it is in the load-path),  
> and inside faceteer.rb we automatically include all the necessary  
> stuff from /home/eyal/faceteer-engine/src.
>
> Try that.
> Sorry for not writing this up before, browserdf.org was not really  
> meant as installable software, but it is currently the only real- 
> life example I have of rails+activerdf.
>
>> Is this okay? For getting started do I have to replace localhost  
>> with  browserdf.com in database.yml?
> yes.
>
>> 0. tomcat with YARS in it (e.g. http://localhost:8080/yars/ 
>> context/ test works for me)
>> 1. rails browserdf
>> 2. changed environment.rb as mentioned above
>> 3. changed database.yml for using YARS data-store
>> 4. tried to start the server WEBrick get this error messages   
>> (starting WEBrick with a simple MySQL connection works fine.)
> this is indeed the good way to figure out the problem. I think your  
> problem is that (1) you didnt start the memcache server (it runs as  
> a separate server), and (2) you maybe used the wrong memcache gem  
> (there are two running around, I linked to the correct one from the  
> wiki).
>
> The easiest thing is to actually not use memcache to start with, as  
> I did in the attached environment.rb. I'd advise memcache for real  
> applications, but to get started, just comment it out.
>
> Let's see if this helps...

I skipped the memcache part as in your environment.rb and now I get  
this error message:

ruby script/server webrick
=> Booting WEBrick...
/usr/local/lib/ruby/1.8/active_rdf/src/adapter/yars/yars_tools.rb: 
167:in `match_predicate': Invalid predicate: #<StringScanner fin>.  
(NTriplesParsingYarsError)
         from /usr/local/lib/ruby/1.8/active_rdf/src/adapter/yars/ 
yars_tools.rb:97:in `parse_n3_triple'
         from /usr/local/lib/ruby/1.8/active_rdf/src/adapter/yars/ 
yars_tools.rb:77:in `parse_yars_query_result'
         from /usr/local/lib/ruby/1.8/active_rdf/src/adapter/yars/ 
yars_tools.rb:71:in `each_line'
         from /usr/local/lib/ruby/1.8/active_rdf/src/adapter/yars/ 
yars_tools.rb:71:in `parse_yars_query_result'
         from /usr/local/lib/ruby/1.8/active_rdf/src/adapter/yars/ 
yars_adapter.rb:112:in `query'
         from /usr/local/lib/ruby/1.8/active_rdf/src/query_generator/ 
query_engine.rb:240:in `execute'
         from /usr/local/lib/ruby/1.8/active_rdf/src/core/resource.rb: 
88:in `get'
         from /usr/local/lib/ruby/1.8/active_rdf/src/node_factory.rb: 
279:in `create_resource_and_store_in_cache'
          ... 23 levels...
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ 
custom_require.rb:21:in `require__'
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ 
custom_require.rb:21:in `require'
         from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/ 
lib/active_support/dependencies.rb:147:in `require'
         from script/server:3

I think I've installed the latest activerdf branch from Demetrius.  
What does happen here?


Regards
Ingo

> -eyal
> <environment.rb>
> _______________________________________________
> Activerdf mailing list
> Activerdf at lists.deri.org
> http://lists.deri.org/mailman/listinfo/activerdf



More information about the Activerdf mailing list