ruby-on-rails - Heroku 中的 unicorn ?为什么不在开发中?

标签 ruby-on-rails heroku

我刚刚安装了 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/

相关文章:

heroku - heroku 和 github 有什么区别

ruby-on-rails - rails : Field 'browser' doesn't contain a valid alias configuration when pushing to Heroku

git - 使用 git push 保存 .sqlite

node.js - Heroku 默认的 Node.js 应用程序

ruby-on-rails - 如何删除嵌套在主题内的帖子内的评论?

ruby-on-rails - 如何在 Rails 上使用 bootstrap3-datetimepicker-rails gem?

ruby-on-rails - 所有可能的模型验证错误

ruby-on-rails - 在 Controller 中排序数组

ruby-on-rails - 我的Rails 3应用中的Metric-fu无法运行

heroku - Postgres.app 升级,现在 Rails 应用程序无法启动