Starting and Stopping the Ruby Notifier Process
Your Foundation server comes with a Ruby notifier process pre-installed. This process is responsible for dispatching email notifications when certain events happen within your Rails application. This may consist of a geofence violation (enter/exit), a speed threshold being exceeded, or a device going offline after a certain amount of time. The notifier is part of your Rails application, but is started and stopped separately from the application. This should happen automatically when deploying with Capistrano, but we’ll save that for a future article.
When you receive your Foundation welcome email the Ruby notifier automatically be up and running. There are certain situations where you may need to stop or restart the notifier process. To do this you’ll need to SSH into your server and first check to see if it’s running:
In most cases the notifier will be running and you’ll see something that looks like the following:
If the notifier is not running you won’t see any results. So let’s go ahead and take a look at how to stop the notifier. Your Foundation welcome email points out a few useful directories while doing development. One of these is the Rails directory, which is located at /opt/ublip/rails/current. Let’s change to that path:
Stopping the notifier is as simple as issuing the following command:
This should take no time at all to return and your notifier process has been stopped. To start it back up you simply need to issue the following:
It’s useful to keep in mind that any exceptions that come into the system while the notifier is turned off will be processed when it’s started back up.
