Guard::Unicorn automatically restarts the Unicorn server using [Guard] gu.
Using Rubygems:
$ gem install guard-unicorn
Using Bundler, add this to your Gemfile, preferably in the development group:
group :development
gem 'guard-unicorn'
endAdd a sample Guard definition to your Guardfile:
$ guard init unicorn
Please read the [guard usage doc] gd in order to find out more about Guard and how to use Guards. There is also [a Railscast about Guard] gc, created by Ryan Bates.
It is recommended that you also install the [ruby-gntp] gntp on Mac OS X, [libnotify] ln on Linux, FreeBSD or Solaris or [rb-notifu] notifu in order to have graphical notifications.
guard :unicorn, :daemonized => trueAvailable options:
:daemonizedrun the Unicorn server as a daemon. Can betrueorfalse. Defaults tofalse:bundlerusebundle execto start Unicorn. Defaults totrue.:config_filepath to the Unicorn config file. Defaults toconfig/unicorn.rb:pid_filepath to the Unicorn PID file. Defaults totmp/pids/unicorn.pid:preloadingis Unicorn configured to preload the application? Defaults tofalse.:porton what port to run Unicorn. Defaults to8080.:unicorn_railsuseunicorn_railscommand instead ofunicorn. For ancient Rails versions. Defaults tofalse.