Run Talia using JRuby
This document describe how to install the generic version of the Talia framework using JRuby. Discovery partners and other people who want to install the Discovery version of Talia do not need to follow these instructions. They will find a complete installation manual at InstallTaliaForDiscoveryPartners
Even if you don't want to use the Discovery version you should have a look at the manual. It contains various hints on how to set up a production environment.
Prerequisites
- Java Virtual Machines (any version >= 1.5)
- git (Download it | from here for mac os x)
Quick install
Usually this will be all you need to get Talia with JRuby up and running. Below you will find more involved instructions for installing JRuby manually - but if you do that you're basically on your own. You don't need to set up any environment variables for JRuby. These instructions will not work on Windows (though you should still be able to run everything on Windows).
> git clone git://github.com/net7/talia.git talia_app > cd talia_app > git clone git://github.com/net7/talia_demo_data.git demo_data > git submodule init > git submodule update > ./fetch-jruby.sh > cd config/ > cp talia_core.yml.app_example talia_core.yml > cp database.yml.app_example database.yml > cp rdfstore.yml.app_example rdfstore.yml
At this point you should probably modify your database.yml for your own database. (Note that SQLite is now available in JRuby, it may still cause problems).
Linux may get a /tmp/mysqld.sock not found message on startup. In this case they can either configure the correct mySQL sock file in database.yml, or they can use 127.0.0.1 for the mySQL host instead of localhost.
Edit talia_core.yml and set local_uri to something like:
# The domain URI that is the "local" domain of this installation local_uri: "http://localhost:3000/"
then do:
> cd .. > ./talia.sh shell Opening JRuby environment for Talia... talia-bash >> rake talia:init_app ... talia-bash >> rake talia_core:demo_import demodir=demo_data/lucca owlify=yes talia-bash >> jruby script/server
Now the demo version of Talia should be running from the latest sources.
Prerequisites only for manual JRuby installation
- JRuby 1.0.3 or later (http://dist.codehaus.org/jruby/)
- MySQL
- Sesame 2
- Rails
Installation Procedure (manual, outdated)
- Install Java
- Install JRuby
- Set Environment Variables
JAVA_HOME=/path/to/jvm
"JAVA_HOME/bin" to PATH variable "<jruby>/bin" to PATH variable
For Linux also add:
"JAVA_HOME/lib" to LD_LIBRARY_PATH variable
For MacOS, the JAVA_HOME should be set to /System/Library/Frameworks/JavaVM.framework/Home
Setting the JRUBY_HOME variable is NOT recommended any more for newer versions of JRuby!
- (optional) If gem does not work or if you want to have a separate repository for Ruby and JRuby, set the environment variable:
GEM_HOME=/path/to/gem/directory
Linux example:
# set JAVA_HOME and JRUBY_HOME export JAVA_HOME=/usr/lib/jvm/java-6-sun export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/jruby-1.0.3/lib:$JAVA_HOME/lib # add JRUBY_HOME to search path export PATH=$PATH:/usr/jruby-1.0.3/bin:LD_LIBRARY_PATH=$LD_LIBRARY_PATH # set GEM_HOME (optional) export GEM_HOME=/usr/jruby-1.0.3/lib/ruby/gems/1.8
Windows example: {{{set JAVA_HOME = c:\Program Files\Java\jre1.6.0_03
set PATH = %PATH%;c:\jruby-1.0.3\bin;%JAVA_HOME%\bin }}}
- Install RubyOnRails? and related required gems: mysql builder meta_project uuidtools progressbar paginator mongrel (java version) etc.
- Configure Sesame and related classpath: Include libs (/vendor/plugins/ActiveRDF/activerdf-sesame/ext) in the Java CLASSPATH (environment variable)
- Install Talia, downloading it from SVN
- Configure Talia
database.yml (see database.yml.app_example for documentation)
rdfstore.yml (see rdfstore.yml.app_example for documentation)
talia_core.yml (see talia_core.yml.app_example for documentation)
CruiseControl Integration
Install following gems: * rails * builder * jruby-openssl * ruby-openid
For the server:
Add the following code to config/cruise_config.rb
Project.configure do |project|
project.build_command = "jruby -S rake"
end
For your working copy:
$ jruby -S rake cruise
NOTE At this time (rev [658]) the build with JRuby fails on my machine.
Status
WORK_IN_PROGRESS (on these notes) :)
