2

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?

BinaryMisfit
  • 1,593
  • 2
  • 15
  • 30

1 Answers1

2

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
Tim Brigham
  • 15,465
  • 7
  • 72
  • 113
  • 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