Susanta Datta wrote:
Hi, my composite has a ruby implementation. In my Ruby file I require "rubygems" and some other 
ruby files. How do I set those folder and files in my sca java project ? I tried with calculator script 
in eclipse IDE. I works fine but if I add new a "require rubygems" in the .rb file I get an 
error <unknown>:19: no such file to load -- rubygems (LoadError).

Any idea where and how do I configure Ruby dependencies in the java sca project 
under eclipse?

thanks a lot Susanta

I am looking into this. To test what happens with "require" statements I changed one of our scripting samples:
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/samples/calculator-script/src/main/resources/calculator/SubtractServiceImpl.rb

and added a "require" as follows:
require 'rexml/document'
include REXML

def subtract(n1, n2)
   doc = Document.new <<-eof
     <Hello xmlns="http://test";>
       <name>Foo</name>
     </Hello>
   eof
   print doc
   return n1 - n2
end

and it works, I'm getting:
<Hello xmlns='http://test'>
 <name>Foo</name>
</Hello>
3 - 2=1.0

REXML is part of the jruby distribution. Next, I'm going to try to require another .rb file in the same project and will let u know what I find.

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to