i host my rails application on cloud server, my server is using centos 6, and what i am trying to achieve is, i want everytime server is restarted, i need my rails app to do an auto start.
i tried crontab, but somehow i can't get it working, here is my crontab content :
@reboot cd ~/UAAdmin/urbanacecode && /usr/local/rvm/gems/ruby-2.2.4/bin/bundle exec rails server -d >> deploy_log.log 2>&1 &
as you can see, i dump my crontab result to log file, somehow it's not working?
here is my dump result :
/usr/bin/env: ruby_executable_hooks: No such file or directory
this is very strange, because when i tried to run my crontab commands manually, i can see the server running.
i ran this manually
cd ~/UAAdmin/urbanacecode
then
/usr/local/rvm/gems/ruby-2.2.4/bin/bundle exec rails server -d
what should i do to get it working? please advice, oh btw i am pretty new with linux OS, so kindly give an example how to do it properly.
many thanks..