Topic: Rails Reboot Script
I am starting to write my first Rails application using Rails 3.0.0. I am at the point where I have uploaded the application to my host and have everything working as I want. I am now trying to put together a script to start my server in the case where my host reboots the server.
I have put together the following shell script which I will execute on reboot via crontab - once its working!
cd /home/userXXX/apps/wedding && rvm use 1.9.2 && thin start -e production -p 1300 -d
This script works great when I run it from my application directory /home/userXXX/apps/wedding
When I run the script from anywhere I get an error:
>> Writing PID to tmp/pids/thin.pid
>> Using rack adapter
Could not find activesupport-3.0.0 in any of the sources
Try running `bundle install`.
This is likely as much a Unix issue as a Rails issue since it seems like the script is running the 'thin start' command from the wrong directory, even though I am changing to the correct directory.
Any direction you can provide would be much appreciated by this newbie. Thanks!