Rails 5.1.4无法启动并给我错误:JRuby或Windows Exiting不支持工作模式

时间:2018-01-02 01:23:26

标签: ruby-on-rails ruby ruby-on-rails-4

我尝试启动我的rails服务器,但下面收到错误消息,我该如何解决呢

C:\Sites\sample_app>rails s
=> Booting Puma
=> Rails 5.1.4 application starting in development
=> Run `rails server -h` for more startup options
  Please add the following to your Gemfile to avoid polling for changes:
    gem 'wdm', '>= 0.1.0' if Gem.win_platform?
  Please add the following to your Gemfile to avoid polling for changes:
    gem 'wdm', '>= 0.1.0' if Gem.win_platform?
ERROR: worker mode not supported on JRuby or Windows
Exiting

1 个答案:

答案 0 :(得分:0)

根据Puma的this问题页面,可以通过在puma.rb中注释掉以下行来解决:

workers Integer(ENV['WEB_CONCURRENCY'] || 2)