RAILSSVR

The RAILSSVR command is used to start and stop the Thin server.  Thin is to Rails and Ruby as Apache Tomcat is to Servlets and Java.

Start Server Example

RAILSSVR ACTION(*START) APP('/www/A2222/htdocs/A2222') VRM(*V20) PORT(2202)

End Server Example

RAILSSVR ACTION(*END) APP('/www/A2222/htdocs/A2222')

Keyword definitions

ACTION - Declares the action to take for the Thin server, to start or end it.  Valid values are *START and *END.

APP - The full IFS path to the root folder of the Rails app.  For example, if your applications Gemfile was located at /www/apache_instance_name/htdocs/app_name/Gemfile then this value should be /www/A2222/htdocs/A2222.

VRM - The PowerRuby version to be used.  Valid values: *V20.  Only valid with option ACTION(*START).

Learn more about PowerRuby versions here.

PORT - The IBM i port this Thin instance should listen on for incoming requests. Only valid when ACTION(*START).

ENV - The Rails environment this Thin instance should be started with.  This will effectively set the PASE RAILS_ENV environment variable. Only valid when ACTION(*START).

HOST - Specify the host IP.  The default is 127.0.0.1.  Another common value that also allows for bypassing the Apache server is using 0.0.0.0

PID - PID stands for "process identification number" in the Linux and Unix world.  With PASE, the IBM i has that similar environment.  The string value specified here is the name of the file that will be stored in /www/A2222/htdocs/A2222/tmp/ The default value of 'server' should be fine for most purposes. Only valid when ACTION(*START).