Open iluoyi opened 11 years ago
Dear Yi, you need to install the exactly versions mention in the documentation.
Please send me the output of the following commands so I can check what is going on:
ruby -v gem list
On Mon, Apr 1, 2013 at 12:09 AM, Yi notifications@github.com wrote:
Hello my friend, 1.When running this package with the example command, I got the following error:
$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs
SyntaxError: /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63: syntax error, unexpected ':'
when RDFS::Resource: resource.uri ^
require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at org/jruby/RubyKernel.java:1027 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124
2.Then I adapted the corresponding code in namespace.rb as follows:
uri = case resource when RDFS::Resource resource.uri else resource.to_s end
However, I then got this error:
NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 each at org/jruby/RubyArray.java:1613 singleton at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 register at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at org/jruby/RubyKernel.java:1027 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124
Why did not the method "type" exist? Please help me with this problem. Thank you very much.
--Yi
— Reply to this email directly or view it on GitHubhttps://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1 .
Hi Samuraraujo,
Thanks you very much for your reply.
The following was the output:
~$ jruby -v jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.6.0_27-b27 [linux-amd64]
~$ gem list
* LOCAL GEMS *
actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)
~$ jruby -S gem list
* LOCAL GEMS *
actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)
As you can see, only one gem is not the same as your suggestion, which is "jruby-launcher (1.0.15 java)" The reason is that I cannot correctly install version 1.0.7 for JRuby (1.7.3). If possible, could you please also tell me:
Thanks, --Yi
On Mon, Apr 1, 2013 at 7:15 AM, samuraraujo notifications@github.comwrote:
Dear Yi, you need to install the exactly versions mention in the documentation.
Please send me the output of the following commands so I can check what is going on:
ruby -v gem list
On Mon, Apr 1, 2013 at 12:09 AM, Yi notifications@github.com wrote:
Hello my friend, 1.When running this package with the example command, I got the following error:
$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs
SyntaxError:
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63: syntax error, unexpected ':'
when RDFS::Resource: resource.uri ^
require at org/jruby/RubyKernel.java:1027 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at org/jruby/RubyKernel.java:1027 require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124
2.Then I adapted the corresponding code in namespace.rb as follows:
uri = case resource when RDFS::Resource resource.uri else resource.to_s end
However, I then got this error:
NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 each at org/jruby/RubyArray.java:1613 singleton at
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 register at
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29 (root) at
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104 require at org/jruby/RubyKernel.java:1027 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at org/jruby/RubyKernel.java:1027 require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124
Why did not the method "type" exist? Please help me with this problem. Thank you very much.
--Yi
— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1> .
— Reply to this email directly or view it on GitHubhttps://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15712127 .
Dear Yi, you can use jruby 1.7 but with ruby 1.8.7. Currently, you use ruby 1.9.3. You should install ruby 1.8.7 on Jruby to make it work.
It should work both on mac and linux.
Tell me if it works for you. You have to install the gems again for ruby1.8.7 Samur
On Tue, Apr 2, 2013 at 8:15 PM, Yi notifications@github.com wrote:
Hi Samuraraujo,
Thanks you very much for your reply.
- Actually, in your document, you mentioned the version of gems but no suggestions for Ruby.
- You recommended JRuby at section 2. However, your example command starts with "ruby". I'm just a little bit confused. At last, I installed the latest JRuby (1.7.3) and tested the package under the latest Ubuntu (12.10).
The following was the output:
~$ jruby -v jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.6.0_27-b27 [linux-amd64]
~$ gem list
* LOCAL GEMS *
actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)
~$ jruby -S gem list
* LOCAL GEMS *
actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)
As you can see, only one gem is not the same as your suggestion, which is "jruby-launcher (1.0.15 java)" The reason is that I cannot correctly install version 1.0.7 for JRuby (1.7.3). If possible, could you please also tell me:
- Which ruby implementation do you recommend, Ruby or JRuby? And Which version should I select?
- Which OS do you recommend?
Thanks, --Yi
On Mon, Apr 1, 2013 at 7:15 AM, samuraraujo notifications@github.comwrote:
Dear Yi, you need to install the exactly versions mention in the documentation.
Please send me the output of the following commands so I can check what is going on:
ruby -v gem list
On Mon, Apr 1, 2013 at 12:09 AM, Yi notifications@github.com wrote:
Hello my friend, 1.When running this package with the example command, I got the following error:
$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs
SyntaxError:
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63:
syntax error, unexpected ':'
when RDFS::Resource: resource.uri ^
require at org/jruby/RubyKernel.java:1027 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
require at org/jruby/RubyKernel.java:1027 (root) at
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at org/jruby/RubyKernel.java:1027 require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124
2.Then I adapted the corresponding code in namespace.rb as follows:
uri = case resource when RDFS::Resource resource.uri else resource.to_s end
However, I then got this error:
NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40
each at org/jruby/RubyArray.java:1613 singleton at
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40
register at
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29
(root) at
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104
require at org/jruby/RubyKernel.java:1027 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
require at org/jruby/RubyKernel.java:1027 (root) at
/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at org/jruby/RubyKernel.java:1027 require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at
/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36
require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124
Why did not the method "type" exist? Please help me with this problem. Thank you very much.
--Yi
— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1> .
— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15712127>
.
Yi Luo The Semantic Web and Agent Technologies (SWAT) lab Lehigh University
— Reply to this email directly or view it on GitHubhttps://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15792615 .
Dear Samur,
I appreciate your information! My JRuby works:D
However, I'm a beginner in both SERIMI and Ruby, I just cannot clearly understand the following output after directly running your example. I am wondering if it is due to the lack of proper data repository. Could you please give me some hints on what should I do next so that I can get the proper "X :sameAs Y" result?
user$ ruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs -f nt
./search_module.rb:175 warning: don't put space before argument parentheses Querying ...http://www4.wiwiss.fu-berlin.de/sider/sparql SELECT ?o WHERE { ?s http://xmlns.com/foaf/0.1/homepage ?o . ?s < http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < http://rdfs.org/ns/void#Dataset> . } Via POST Querying ...http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org SELECT ?o WHERE { ?s http://xmlns.com/foaf/0.1/homepage ?o . ?s < http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < http://rdfs.org/ns/void#Dataset> . } Via POST PROCESSING CLASSES http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs LAST CLASS nil get_entity_labels Executing. .. Using ... http://www4.wiwiss.fu-berlin.de/sider/sparql Querying ...http://www4.wiwiss.fu-berlin.de/sider/sparql select distinct ?s ?x ?o where {?s ?x ?o . ?s ?p < http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs> .} limit 4000 Via POST REXML::ParseException: Missing end tag for 'hr' (got "body") Line: Position: Last 80 unconsumed characters:
Hello my friend, 1.When running this package with the example command, I got the following error:
$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs
SyntaxError: /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63: syntax error, unexpected ':'
require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at org/jruby/RubyKernel.java:1027 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124
2.Then I adapted the corresponding code in namespace.rb as follows:
However, I then got this error:
NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 each at org/jruby/RubyArray.java:1613 singleton at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 register at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at org/jruby/RubyKernel.java:1027 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124
Why did not the method "type" exist? Please help me with this problem. Thank you very much.
--Yi