Date Name Downloads
Jun 5, 2012 Beta 3 187
May 21, 2012 Beta 2 113
Apr 26, 2012 Beta 1.1 127
Apr 23, 2012 Beta 1 97
Beta 1
Beta 1
Apr 23, 2012
Apache License
97

 

<strong>Features</strong></div>

&nbsp;
  • Works with both #-style and $-style bindings and for both value bindings and method bindings (e.g. beforePageLoad)
  • Allows for Ruby "Script Libraries". For now, these are accomplished by creating a "ruby" folder inside the database's WEB-INF folder (via Package Explorer) and putting Ruby scripts in there. Then, they can be references on a page like a normal library but with "text/ruby" or "text/x-ruby" as the type: <xp:script src="/somelibrary.rb" type="text/ruby" clientSide="false"/>
  • Can access local variables as readily as in Server JavaScript, such as "session", "database", and repeat-local variables
  • The included file "domino.rb" contains some extensions for the Domino product objects in Ruby, allowing for Ruby-style looping in collection classes (e.g. docs.each { |doc| ... }) and hash-style access to a document's item values (e.g. doc["Form"]). It is meant to be added to the project as a "Script Library" as described above
  • Though currently commented out, there is some extremely-basic support for arbitrary other scripting languages. If you uncomment the applicable/* */ block in frostillicus/ScriptingViewHandler.java, it will register all available JSR-223-compliant languages with binding names based on the language name provided by the language package (such as "#{Groovy: ... }" or "#{scheme: ... }"). Note that other languages have had essentially no testing, Jython is known to be problematic, and there is no automatic variable resolution. See http://frostillic.us/f.nsf/posts/F660516EC59A25FC852579E5007D5F9C for a casual overview
&nbsp;

&nbsp;

<strong>Installation</strong></div>
  • Install JRuby 1.6+ on the server. The most straightforward way to do this in lieu of an Eclipse Update Site package is to download jruby-complete.jar and place it in the server's jvm/lib/ext folder, then restart HTTP
  • I'm not sure if it's necessary, but if you run into security problems, it may be required to grant the JVM additional permissions: http://www-01.ibm.com/support/docview.wss?uid=swg21279509
  • In the application where you want to use Ruby bindings, copy in the provided Java classes as Java design elements (or otherwise add them to the project's build path)
  • Modify the application's faces-config.xml to add frostillicus.ScriptingViewHandler as a view handler (see faces-config-example.xml)
  • Start using "#{ruby: ... }" bindings! I suggest starting with something simple, like <xp:text value="#{ruby:Time.now.year}"/> for troubleshooting purposes