Starting on boot a rails server
===

I'm using Ubuntu Server and I have a rails application. I want to start the rails server on the boot. I've already put the files on the /etc/init.d/ and also I've created a crontab with the command:

cd ~/myapp/
nohup rails s -p 8000 &

I've already used Puma Server(https://github.com/puma/puma/) but I cannot start the server. If I execute the script manually, so the server started perfectly. I don't know how it is happening. Someone has been passed something similar to this?