user9128564
user9128564

Reputation:

Rails 5.1.4 not starting and giving me ERROR: worker mode not supported on JRuby or Windows Exiting

I tried starting my rails server but got the error message below, how can i fix it please

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

Upvotes: 0

Views: 3545

Answers (2)

yasen abd
yasen abd

Reputation: 21

According to the same issue page for Puma, for the newer versions of rails , it can be resolved by commenting out the following line in puma.rb:

# workers ENV.fetch("WEB_CONCURRENCY") { 2 }

Upvotes: 2

roelofs
roelofs

Reputation: 2170

According to this issue page for Puma, it can be resolved by commenting out the following line in puma.rb:

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

Upvotes: 5

Related Questions