The win32-service library provides a Ruby interface to services on MS Windows. You can create new services, or control, configure and inspect existing services. In addition, you can create a pure Ruby service by using the Daemon class that is included as part of the library.
Gemfile gem 'win32-service', '~> 0.7.1'
install gem install win32-service -v 0.7.1