flocker

Ensure that only one instance of a Ruby script will be run at a time on unix-based systems. For more information on file locking see: flock(2) manpage

Installation

gem install flocker

Usage

To use flocker simply require it in your script:

require 'flocker'