我刚刚安装了 unicorn gem 并在 config/unicorn.rb 下添加了配置文件
我还添加了一个看起来像这样的 Procfile:
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
我想知道,即使我添加了这个,为什么我的本地主机没有在 Unicorn 中运行?哪里说这应该只在生产中运行?
最佳答案
如果你不加载 unicorn
gem 在您的 GemFile
, Rails 将默认为 WebBrick
我们使用 Thin
在开发中,这是我们的 GemFile:
group :development do
gem 'thin'
end
group :production do
gem 'puma'
gem 'newrelic_rpm'
end
您也可以从这个问题中受益:Why would I want to use unicorn or thin instead of WEBrick for development purposes?
关于ruby-on-rails - Heroku 中的 unicorn ?为什么不在开发中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22087179/