Example 4-30 Deploying using script ruby_app_install

$whoami ruby_dep

$gunzip -c ruby_app_installer.tar.gz tar -xf -

$ls -l total 7480

drwxrwxr-x 2 ruby_dep

test01

4096 2008-06-27

20:41 bin

drwxrwxr-x 3

ruby_dep

test01

4096 2008-06-27

21:33 gem

drwxrwxr-x 2

ruby_dep

test01

4096 2008-06-27

20:41 odbcdrv

-rwxr-xr-x

1

ruby_dep

test01

2973 2008-06-27

14:21 ruby_app_install

-rw-rw-r--

1

ruby_dep

test01 7630289 2008-06-27

21:31 ruby_app_installer.tar.gz

$./ruby_app_install -p /home/ruby_dep/ruby_app -r Successfully installed ibm_db-0.9.0

1 gem installed

Installing ri documentation for ibm_db-0.9.0...

Installing RDoc documentation for ibm_db-0.9.0...

System

variables registered.

Please

re-login to have the settings be effective.

Deployment

finished.

 

 

After deploying the Ruby application, logout and login again for the new environment setting to take effect. You can see the subdirectories in the specified location. The Ruby application is placed in the bin subdirectory of the specified location. After successful deployment, you are now ready to proceed with the application testing. Example 4-31shows the output of our newly deployed sample application, itso_rubyapp.rb.

Example 4-31 Testing deployed Ruby application

$ cd /home/ruby_dep/ruby_app/bin

$ruby itso_rubyapp.rb mensa 50001 test db2inst1 password Trying to establish connection...

Is connection active? : true Closing connection...

Connection closed.

4.5.5Help and support

You can obtain assistance from IBM using the following forum section in the rubyforge Web site:

http://rubyforge.org/forum/?group_id=2361

188DB2 Deployment Guide

Page 202
Image 202
IBM manual Help and support, Example 4-30 Deploying using script rubyappinstall, 188 DB2 Deployment Guide