Ruby Sinatra Unicorn - Errno::EIO Input/output error
This has caught me out twice now, so typing it up to remember. By default Unicorn outputs stderr/stdout to terminal, which is great if you have one running, but if you don't (i.e. you logged off) you get a massive error screen were your app was "Errno::EIO Input/output error" in "lint.rb" or something similar.
To fix this just add the following lines to your unicorn.conf file you create for your application, which redirect the output to log files instead:
# By default, the Unicorn logger will write to stderr.# Additionally, some applications/frameworks log to stderr or stdout,# So prevent them from going to /dev/null when daemonized here:stderr_path "/srv/www/logs/unicorn.stderr.log"stdout_path "/srv/www/logs/unicorn.stdout.log"