rorus is a command-line tool to simplify basic start/stop operations of a Ruby On Rails Unicorn Server.
rorus does not require sudo or init.d.
$ rorus [ start | status | stop ]
rorus is released under the GPLv3 license. THIS SOFTWARE COMES WITH ABSOLUTELY NO GUARANTEES OR WARRANTIES.
The following steps will install rorus to a Linux/UNIX system, using the directory /home/user/bin.
This guide assumes some familiarity with Linux/UNIX systems and basic programming.
Before installing the rorus file, be sure the filesystem has a directory for it, and the directory is in the PATH.
- Make a directory in your home folder for executable scripts. For example:
$ mkdir bin
Add the directory to your PATH by editing your .bashrc file (or other shell initializer). For example:
- Add it to an existing statement:
$ export PATH="
- Or use an additional statement:
$ export PATH="$PATH:/home/user/bin"
Add the file, change or confirm the application variables, and verify rorus is executable.
Transfer the rorus file to /home/user/bin.
Open the rorus file with a text editor, and change the following variable:
- line 18: app_dir
the root directory for the rails application
- line 18: app_dir
With the text editor still open, verify the following default values, and make changes if needed:
line 19: config_file
the config file for the unicorn server
line 20: pid_file
the PID file created by the unicorn server
line 21: server_start_cmd
the command used to start the unicorn server
Save the rorus file.
Make the rorus file executable.
$ chmod 744 rorus
To start the rails application:
$ rorus start
To show the status of an application, including process IDs for a running server:
$ rorus status
To stop a running application:
$ rorus stop
This section is still being developed in response to in-use cases.
- /home/user/bin/rorus: bundle: not found
- Be sure that your $PATH environment variable includes the directory for ruby and ruby gems.
- If you are using chruby, be sure that a Ruby has been selected.
Tested with chruby, Rails 6, and Ubuntu 18.04
(p) 2020 Eli Harrison CC-BY GPLv3