Answer the question
In order to leave comments, you need to log in
How to make Puma start a Ruby on Rails site automatically?
Hello.
I have such a problem. There is a site on RoR, all this is spinning on Ubuntu 12.04 LTS. The site is powered by nginx+puma.
So, when the server is turned off, nginx, ror start automatically, but Puma does not want to, nginx gives a 404 error.
The developers said that you need to execute such a shaitan command:
cd /srv/www/myapp/current && ( RACK_ENV=production ~/.rvm/bin/rvm default do bundle exec puma -C /srv/www/myapp/shared/puma.rb )
Answer the question
In order to leave comments, you need to log in
You can write an init script with this command. Or use foreman. Or schedule in cron via whenever using the :reboot keyword.
IMHO foreman is the best option.
gemfile
...
gem 'foreman'
...
$RAILS_ENV="production"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question