I have a rails application and I want to start the server automatically whenever the machine boots up. Right now I cd to the directory and then type the rails s
command. How can I configure my machine to run my Rail server on boot? I am using Ubuntu and Rails 3.0.0.
相关问题
- How to get the return code of a shell script in lu
- Is shmid returned by shmget() unique across proces
- Why doesn't php sleep work in the windows-subs
- Eager-loading association count with Arel (Rails 3
- how to get running process information in java?
You can use a cron job for this. To add the cron job use the command
crontab -e
. Than you can define a cron job that runs at boot and reboot with@reboot command
.So you'd have something like:
did the trick for me. You might need to reload RVM and for that
will serve the purpose.