Link to home
Start Free TrialLog in
Avatar of Matthew Roessner
Matthew Roessner

asked on

Ruby - Rails - iSeries

Is anyone using Ruby on Rails on the iSeries? I am attempting to start this up from a command line, instead of within QSH.   From within QSH, I run the following:

CD /tmp/sfdc_rc_trunk_nojruby              
thin start -e development -p 9292

This starts up a session but holds onto that session so you are stuck in QSH. If you end it and get out - Ruby is ended.

I was attempting to start this from a command line - but haven't had any luck. I created a shell script that said the following:

#!/usr/bin/sh                              
CD /tmp/sfdc_rc_trunk_nojruby              
thin start -e development -p 9292  

I put that in the same directory as above - and tried to start it up using one of the following 2 commands:

SBMJOB CMD(CALL PGM(QP2SHELL) PARM('/tmp/sfdc_rc_trunk_nojruby/startruby')) JOB(POWER_RUBY) JOBQ(*LIBL/QRUBY) USER(QSYSOPR)

SBMJOB CMD(QSH CMD('/tmp/sfdc_rc_trunk_nojruby/thin start -e development -p 9292')) JOB(POWER_RUBY) JOBQ(*LIBL/QRUBY) USER(QSYSOPR)

Both jobs "complete" right away and don't stay running and Ruby is not "started".

I also made sure that the authority was set to excute, so that shouldn't be a problem.

Any assistance would be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Matthew Roessner
Matthew Roessner

ASKER

When I start QSH interactively (STRQSH) and enter the command I am submitting to batch:

/tmp/sfdc_rc_trunk_nojruby/startruby

Everything starts up fine (but I am "stuck" in QSH and if I exit - Ruby ends.

I did have to modify my startruby script to make sure was running from PASE:

#!/QOpenSys/usr/bin/sh            
cd /tmp/sfdc_rc_trunk_nojruby      
thin start -e development -p 9292  

Now when I start from a command line:

SBMJOB CMD(QSH CMD('/tmp/sfdc_rc_trunk_nojruby/startruby')) JOB(POWER_RUBY) JOBQ(*LIBL/QRUBY) USER(QSYSOPR)

Everything starts up correctly and all seems to be working as expected.  Looks like starting my script and running from the pase shell was the ticket.

Thanks for your help Gary!
Happy to help.