P
P
paulszgr2016-10-02 14:00:59
Ruby on Rails
paulszgr, 2016-10-02 14:00:59

How to run a RoR application in production?

Hello, I'm trying to run an application on ruby ​​on rails using a script:

#!/bin/sh
    /home/gnm/bin/delayed_job start
    cd /home/gnm/
    rpush start -e $RAILS_ENV
    nohup rails s -e $RAILS_ENV -b ************ 2>&1
#
exit 0

If I run from the terminal everything works, but as soon as I exit it, puma stops working. If I put it in cron to start on reboot, then nothing works at all. How to be?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
CapeRatel, 2016-10-02
@CapeRatel

Чтобы запустить приложение ROR в режиме продакшн:
RAILS_ENV=production bundle exec rails s

R
Román Mirilaczvili, 2016-10-02
@2ord

https://www.digitalocean.com/community/tutorials/h...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question