How to start rails server in production mode using unicorn and config file?

后端 未结 3 497
鱼传尺愫
鱼传尺愫 2021-01-01 16:58

I add Gem \'unicorn\' to Gemfile and call rails server unicorn -e production, but I get a load error. Then I add Gem \'unicorn_rails\'

3条回答
  •  难免孤独
    2021-01-01 17:37

    bundle exec unicorn -p $PORT -c ./config/unicorn.rb

    works for me

    I put it in the Procfile and then use Foreman to start it off by entering

    foreman start

提交回复
热议问题