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
rails s
@reboot /bin/bash -l -c 'cd PATH_TO_PROJECT && rails s'
did the trick for me. You might need to reload RVM and for that
@reboot /bin/bash -l -c 'cd PATH_TO_PROJECT && source ~/.rvm/scripts/rvm && rvm use ruby-RUBY_VERSION_HERE && rails s'
will serve the purpose.