[英]How to start rails server in production mode using unicorn and config file?
I add Gem 'unicorn'
to Gemfile and call rails server unicorn -e production
, but I get a load error. 我将Gem'unicorn
Gem 'unicorn'
添加到Gemfile并调用rails server unicorn -e production
,但是我收到了一个加载错误。 Then I add Gem 'unicorn_rails'
, then call rails server unicorn -e production
, but I can't find the socket file. 然后我添加
Gem 'unicorn_rails'
,然后调用rails server unicorn -e production
,但是我找不到套接字文件。 So I am considering if it doesn't use the config/unicorn.rb
file as the configuration? 所以我在考虑是否不使用
config/unicorn.rb
文件作为配置? So I call unicorn_rails -c config/unicorn.rb -E production -D
, but I get another error text file busy
. 所以我调用
unicorn_rails -c config/unicorn.rb -E production -D
,但我得到另一个错误text file busy
。
So now I am stuck in this matter, could you help me? 所以现在我被困在这件事上,你能帮助我吗? :)
:)
It should be something looks like: 它应该是这样的东西:
bundle exec unicorn -E production -c config/unicorn.rb
and you should only need unicorn
gem 你应该只需要
unicorn
宝石
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
service unicorn_projectName start
works for me 适合我
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.