Apache Stonehenge : Stonehenge Ruby Installation Guide
This page last changed on Mar 09, 2009 by dimuthuc@gmail.com.
Table of Content
Installing WSF/Ruby1. Download WSF/Ruby 1.1 binary package from http://wso2.org/projects/wsf/ruby Note: Make sure you have installed WSF/Ruby correctly by running the samples. The guide to run samples can be found in the README.SAMPLES file. Installing WSF/Ruby Trader Client1. Go to a directory where you want to run Ruby Trader client. And create a new rails application by running the following command in a command prompt. rails trader_client (You can give a any name to the project, I choose the name trader_client here.) This will create a directory called 'trader_client' with the necessary file structure for the new rails application. NOTE: I assumed you already have installed ruby and rails framework after following the installation guide of wsf/ruby. 2. Now get the svn checkout of the ruby trader client from Apache Stonehenge svn (https://svn.apache.org/repos/asf/incubator/stonehenge/trunk/stocktrader/ruby/trader_client) and copy 'views'and 'controllers' sub directories to the where_you_create_the_project>/trader_client/app. (You may be asked to overwrite the existing contents. Press 'yes'). 3. Now open a command prompt and naviage to the directory <where_you_create_the_project>/trader_client and start the server by running the following command. ruby script/server 4. Open a browser and navigate to the following URL. This will bring you to the web interface of trader client. You need to first go to the "Config" tab and give the configuration service endpoint to run the trader client properly. Installing WSF/Ruby Order Processor1. Go to another directory for the Rub Order Processor rails project. And create a new rails application (this time with the name order_processor). rails order_processor 2. Now get the svn checkout of the ruby order processor from Apache Stonehenge svn (https://svn.apache.org/repos/asf/incubator/stonehenge/trunk/stocktrader/ruby/order_processor) and copy the 'controllers' directory to the where_you_create_the_project>/order_processor/app. 3. Open the database_config.xml in the <where_you_create_the_project>/order_processor/app directory and provide the following configuration about your mssql database.
3. Now open a command prompt and navigate to the directory <where_you_create_the_project>/order_processor and start the server by running the following command. ruby script/server if you are already running the trader client on the default port for rails(3000), you can run the order processor service in a different port (say 3001) with the option -p like this, ruby script/server -p 3001 4.In order to use the order processor service you have to set the endpoint of the order processor service in the configuration database. (You may directly edit the database table "StockTraderDB/SERVICE".) Here are your endpoints if you are running the ruby server in the port 3000 for order processor ruby application.
|
![]() |
Document generated by Confluence on Jun 22, 2010 14:31 |