Я протестировал свой проект с env разработки, и все работает нормально, но после загрузки проекта на хост я получил эту ошибку.
# log
[2020-02-17T14:54:55.319109 #2097106] INFO -- : [2ac848c8-15f3-47fd-ad77-ede940b1502e] Started POST "/admin/users" for my_server_ip at 2020-02-17 14:54:55 -0500
[2020-02-17T14:54:55.320555 #2097106] FATAL -- : [2ac848c8-15f3-47fd-ad77-ede940b1502e]
[2ac848c8-15f3-47fd-ad77-ede940b1502e] ActionController::RoutingError (No route matches [POST] "/users"):
[2ac848c8-15f3-47fd-ad77-ede940b1502e]
[2ac848c8-15f3-47fd-ad77-ede940b1502e] actionpack (6.0.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:36:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] actionpack (6.0.2.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] railties (6.0.2.1) lib/rails/rack/logger.rb:38:in `call_app'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] railties (6.0.2.1) lib/rails/rack/logger.rb:26:in `block in call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] activesupport (6.0.2.1) lib/active_support/tagged_logging.rb:80:in `block in tagged'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] activesupport (6.0.2.1) lib/active_support/tagged_logging.rb:28:in `tagged'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] activesupport (6.0.2.1) lib/active_support/tagged_logging.rb:80:in `tagged'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] railties (6.0.2.1) lib/rails/rack/logger.rb:26:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] actionpack (6.0.2.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] actionpack (6.0.2.1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] rack (2.1.2) lib/rack/method_override.rb:24:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] rack (2.1.2) lib/rack/runtime.rb:24:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] activesupport (6.0.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] actionpack (6.0.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] actionpack (6.0.2.1) lib/action_dispatch/middleware/static.rb:126:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] rack (2.1.2) lib/rack/sendfile.rb:113:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] actionpack (6.0.2.1) lib/action_dispatch/middleware/host_authorization.rb:83:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] railties (6.0.2.1) lib/rails/engine.rb:526:in `call'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] /opt/passenger-5.3.7-2.el7.cloudlinux/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] /opt/passenger-5.3.7-2.el7.cloudlinux/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:157:in `accept_and_process_next_request'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] /opt/passenger-5.3.7-2.el7.cloudlinux/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] /opt/passenger-5.3.7-2.el7.cloudlinux/src/ruby_supportlib/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_threads'
[2ac848c8-15f3-47fd-ad77-ede940b1502e] /opt/passenger-5.3.7-2.el7.cloudlinux/src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
вот мои маршруты
# config/routes.rb
namespace :admin do
resources :users
end
и вот моя форма
# app/views/admin/users/index.html.erb
<%= form_with(model: admin_user, local: true) do |form| %>
# my form inputs
<%= form.submit class: 'btn btn-dark' %>
<% end %>