Работа в режиме разработки работает нормально. Однако, когда я выполняю команду rails s production, у меня появляется следующее сообщение об ошибке:
rails s production
Exiting
Traceback (most recent call last):
20: from bin/rails:4:in `<main>'
19: from bin/rails:4:in `require'
18: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
17: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
16: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
15: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
14: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
13: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
12: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `perform'
11: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `tap'
10: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:135:in `block in perform'
9: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:38:in `start'
8: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:67:in `print_boot_information'
7: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:96:in `use_puma?'
6: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-2.0.3/lib/rack/server.rb:301:in `server'
5: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-2.0.3/lib/rack/handler.rb:16:in `get'
4: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-2.0.3/lib/rack/handler.rb:74:in `try_require'
3: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
2: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
1: from /home/cabox/.rvm/gems/ruby-2.5.1/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': cannot load such file -- rack/handler/production (LoadError)
Я думаю, что это связано с последней строкой ошибки:
5.1.4/lib/active_support/dependencies.rb:292:in `require': cannot load such file -- rack/handler/production (LoadError)
Я пытался отменить гем activesupport без какого-либо результата. Я использую Ruby on Rails 5.1.4 с rvm под управлением ruby 2.5.1. Моя ОС Ubuntu 14.04.