Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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/thin.3000.pid  
>> 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

1 Answer 1

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. –  Diago Feb 15 '13 at 18:45

Your Answer

 
discard

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.