0

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..

NomNomNom
  • 811
  • 3
  • 12
  • 37
  • Here a forum about the exception, perhaps it can help you: [How to solve “/usr/bin/env: ruby_executable_hooks: No such file or directory”?](http://stackoverflow.com/questions/26247926/how-to-solve-usr-bin-env-ruby-executable-hooks-no-such-file-or-directory) – Ruber Cuellar Valenzuela Dec 08 '16 at 15:21
  • still no luck on this – NomNomNom Apr 12 '17 at 06:19

0 Answers0