Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There's a very highly rated application for defect management called Redmine. It's written in Ruby. I was able to get it working following their instructions. However, I would like to run the application as a service that starts automatically every time the server reboots. How do you go about adding a Ruby website as a Linux service?

share|improve this question
Why the downvote? – User1 Jan 8 '10 at 4:14
up vote 0 down vote accepted

If you're on a recent version of Ubuntu, you'll want to write an Upstart script - as well as that introduction, /etc/init is full of examples.

If you're on anything else, you'll want to create an init script - the redmine wiki has an example, specifically tailored for redmine.

share|improve this answer
That's a great link. I think that will work. – User1 Jan 6 '10 at 16:07

There's no such thing as a "Ruby website"; a Rails site needs an application server process running to serve requests for the app, this is typically one of mongrel, thin, or unicorn (if you're using webrick, you're on a loser already).

Your options are, broadly:

  1. Write an init script for it, invoke that init script on boot as per the procedure for your particular distribution
  2. Use an @reboot rule in cron (uuuuugly)
  3. Use something like daemontools to manage the server process

I do (3), because it is awesome. I expect a lot of people to recommend monit in place of daemontools; I've done that, and I hated every second of it.

share|improve this answer

You may be interested in this:

Once having your system set up properly to run as a real server for Ruby stuff, you can then insert your Redmine application into it's environment.

share|improve this answer
The cluelessness contained in that one page scares the wallop out of me. – womble Jan 6 '10 at 0:32

If you have apache or some other web server already running, you don't need to run Redmine as a separate service - just have it run under your web server. For Apache Just follow the instructions for installing Passenger here:

And then add an entry in Apache that points to the path to that site, like so:

<VirtualHost *:80>
    DocumentRoot /webapps/mycook/public
    <Directory /webapps/mycook/public>
        Allow from all
        Options -MultiViews

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.