
h2. The "Tea Testing Team" example (<%= extract_index(__FILE__) + 1 %> / <%= TITLES.size %>)

<%= render_ttt_menu(__FILE__) %>

This example shows how to implement a business process on top of OpenWFEru and Densha. OpenWFEru depends on Ruby, while Densha depends on Ruby on Rails.


h3. getting Ruby and Ruby on Rails

There are extensive instructions on how to get Ruby and Ruby on Rails on the website of the later : "Get Ruby on Rails in no time":http://rubyonrails.org/down

The latest Rails 2.0.x or Rails 1.2.6 should be OK for running Densha (and OpenWFEru).


h3. getting Densha

Once you've made sure you have a decent Ruby and Ruby on Rails setting, it's time to get a copy of Densha (with OpenWFEru included).

"openwferu-densha-0.9.16.zip":http://rubyforge.org/frs/download.php/28147/openwferu-densha-0.9.16.zip


h3. preparing Densha

When unzipped, rename the top directory 'densha' to 'ttt' :

<pre>
mv densha ttt
</pre>

(these instructions are already detailed at the "Densha quickstart":../rquickstart.html, they are reproduced here but the application is renamed 'ttt'). 


h3. preparing the database

This is a development application (for now), it will use a database named "ttt_development". Let's change <tt>ttt/config/database.yml</tt> to reflect that :

<pre>
development:
  adapter: mysql
  database: ttt_development
  username: ttt
  password: ttt
  host: localhost
  encoding: utf8
</pre>

(MySQL is used in this example, please refer to the <%= rails_documentation %> for more information on how to use another database)

Then create a "ttt" user in MySQL (via the 'root' user) :

<pre style="font-size: 90%;">
mysql -u root -p -e \
"grant select,insert,update,delete,create,drop,index on ttt_development.* to 'ttt'@'localhost' identified by 'ttt'"
</pre>

The database 'ttt_development' has to be created next :

<pre style="font-size: 90%;">
mysql -u root -p -e "create database ttt_development CHARACTER SET utf8 COLLATE utf8_general_ci"
</pre>

<pre>
cd ttt/
rake db:migrate
</pre>


h3. first run

Then test if the application is usable by launching it :

<pre>
cd ttt/
ruby script/server
</pre>

<%= thumbnail("../images/ttt/ttt_greeting.png", 40, :right) %>If everything went fine, you can now head to <a href="http://localhost:3000">http://localhost:3000</a> and you should be greeted by the login screen.

You can login as "admin" (password "admin") and look around a bit, to make sure the install was successful.

<div>&nbsp;</div>
<div>&nbsp;</div>


<%= render_next_page(__FILE__) %>
<%= render_questions %>

