Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed the Slicehost tutorial here and was able to get thin installed in init.d to be able to start at boot.

I also created the required configuration file. When running thin from the command line logged in as root using the command below it works perfectly.

thin start -C /etc/thin/:config:.yml

However, when running thin using service thin start I get the following from the log files:

>> Writing PID to tmp/pids/  
>> Changing process privilege to apache:apache  
>> Using rack adapter  
>> Exiting!  
/var/www/sites/<path>/vendor/bundle/ruby/1.9.1/gems/guard-1.6.2/lib/guard.rb:23:in `expand_path': couldn't find HOME environment -- expanding `~' (ArgumentError)

I suspect there is some environment configuration setting missing but have no idea what to look for.

Has anyone been able to get this working or have any suggestions on what I can do to get this working?

share|improve this question
up vote 2 down vote accepted

Try adding a source of the profile directory to your init script near the top. Looks like the $HOME variable isn't defined.

. /etc/profile
share|improve this answer
Thank you for putting me on the right track. I made it simple and just added export HOME= into the script directly, since for some reason the . /etc/profile didn't work. It's a quick hack for now but it is in a testing environment. – BinaryMisfit Feb 15 '13 at 18:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.