如何将Rails开发服务器设置为webbrick而不是Puma

bob*_*sol 8 ruby-on-rails heroku puma

我在Heroku上使用Puma作为我的服务器.当我安装了Puma gem时,我的开发环境会以Puma作为服务器启动.如果不从我的gemfile中提取pum gem,我似乎无法关闭它.

我喜欢在开发中使用保存服务器作为生产的想法,但美洲狮服务器使我很难跟踪我的调试语句.此外,我似乎没有办法改变最大线程,即使我的puma.rb文件设置为1,在开发中出现16.

Mon*_*eep 20

只需在生产模式下使用puma.在你的Gemfile变化gem 'puma'

#Gemfile
group :production do
  gem 'puma'
end
Run Code Online (Sandbox Code Playgroud)

然后运行bundle install --without production以安装gem.

  • `bundle install --without production`对我有用.谢谢. (2认同)