rod mclaughlin


JRuby - yet another web application framework (27 mar 10)

I downloaded TRISANO, an open-source application for infectious disease, environmental hazards, and bioterrorism attacks. I am applying for a job working on it, so I thought it would be a good idea to try to figure out what it does and how.

https://wiki.csinitiative.com/display/tri/TriSano+Core+-+Installation+Instructions

The instructions are a bit odd - it's not clear whether you are supposed to be creating a Unix user or a Postgresql user at times, when it says

sudo chown $user_name:$user_name /var/log/trisano

without being clear what $user_name is

It's also not clear how to use it. I got as far as

"You can now create events in the jurisdiction, route them etc." 

The beast depends on JRUBY, which is Java plus Ruby. It enables Ruby applications to tap into the rich variety of Java libraries. It also enables the developer to spend hours dealing with dependency issues, for example a version of RSpec which needs Mechanize < version 0.8. In other words, it adds the complexity of Java to the simplicity of Ruby on Rails.

I couldn't get the test suite to work. Running the tests is usually considered de rigeur by developers these day.

cd trisano/webapp
rake spec

You have to edit a file called trisano/webapp/lib/tasks/cucumber.rake
and remove the following lines:

 t.cucumber_opts = "--format pretty -p standard --tags ~@pending"
 t.step_list = ["features/shared_step_definitions", "features/standard_step_definitions"]
 t.step_pattern = "*.rb"
 t.feature_list = ENV["FEATURE"] ? [ENV["FEATURE"]] : ["features/standard"]
 t.feature_pattern = "*.rb" 

The instructions tell you to do

gem install activerecord-jdbcpostgresql-adapter

but in fact you have to do this to download the jdbc postgresql gem

 sudo PATH-TO-JRUBY-BIN/jruby -S gem install activerecord-jdbcpostgresql-adapter

jruby/bin is under your tristano installation folder's lib folder

That didn't work either - rake rspec still couldn't find that gem

If there is an error in starting Trisano, it shows you an error page but, unlike a Rails app, it does not display any error messages on the terminal nor write anything to development.log

 



Back
Portland London