[英]Rails: ActionView::Template::Error (wrong number of arguments (given 4, expected 0..1)):
In only production
environment I get following errors.仅在
production
环境中,我收到以下错误。
[81bedcfb-4b75-445c-b56e-ce17a1c477db] app/views/layouts/application.html.erb:17
I, [2022-06-30T14:05:56.938148 #71839] INFO -- : [ae44ac69-b517-40d4-9022-32d48befe086] Started GET "/" for 127.0.0.1 at 2022-06-30 14:05:56 +0800
I, [2022-06-30T14:05:56.939300 #71839] INFO -- : [ae44ac69-b517-40d4-9022-32d48befe086] Processing by DashboardController#index as HTML
I, [2022-06-30T14:05:56.942026 #71839] INFO -- : [ae44ac69-b517-40d4-9022-32d48befe086] Rendered dashboard/index.html.erb within layouts/application (Duration: 0.2ms | Allocations: 4)
I, [2022-06-30T14:05:56.943254 #71839] INFO -- : [ae44ac69-b517-40d4-9022-32d48befe086] Rendered layout layouts/application.html.erb (Duration: 1.4ms | Allocations: 647)
I, [2022-06-30T14:05:56.943428 #71839] INFO -- : [ae44ac69-b517-40d4-9022-32d48befe086] Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms | Allocations: 1418)
F, [2022-06-30T14:05:56.945594 #71839] FATAL -- : [ae44ac69-b517-40d4-9022-32d48befe086]
[ae44ac69-b517-40d4-9022-32d48befe086] ActionView::Template::Error (wrong number of arguments (given 4, expected 0..1)):
[ae44ac69-b517-40d4-9022-32d48befe086] 1: <nav aria-label="breadcrumb" class="-intro-x h-[45px] mr-auto">
[ae44ac69-b517-40d4-9022-32d48befe086] 2: <ol class="breadcrumb breadcrumb-light">
[ae44ac69-b517-40d4-9022-32d48befe086] 3: <li class="breadcrumb-item">
[ae44ac69-b517-40d4-9022-32d48befe086] 4: <%= link_to "Home", root_path %>
[ae44ac69-b517-40d4-9022-32d48befe086] 5: </li>
[ae44ac69-b517-40d4-9022-32d48befe086] 6:
[ae44ac69-b517-40d4-9022-32d48befe086] 7: <% breadcrumbs.each_with_index do |item, index| %>
[ae44ac69-b517-40d4-9022-32d48befe086]
[ae44ac69-b517-40d4-9022-32d48befe086] app/views/shared/_breadcrumb.html.erb:4
[ae44ac69-b517-40d4-9022-32d48befe086] app/views/shared/_topbar.html.erb:11
Below errors only occurs on routes /for example: root_path, dashboard_path etc./.以下错误仅发生在路由上/例如:root_path、dashboard_path 等/。
Here is the my router.rb
这是我的
router.rb
# require 'sidekiq/web'
Rails.application.routes.draw do
# post "/graphql", to: "graphql#execute"
root 'dashboard#index'
# authenticate :admin do
# mount Sidekiq::Web => "/sidekiq"
# mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graphql"
# end
resources :organizations do
collection do
get :users
end
member do
post :admins, to: 'organizations/tabs#admins'
post :customers, to: 'organizations/tabs#customers'
post :addresses, to: 'organizations/tabs#addresses'
end
end
resources :users
namespace :finance do
resources :accounts
resources :transactions, except: [:edit, :update]
end
resources :lawyers do
resources :settings, controller: 'lawyers/settings', only: [:index, :update]
resources :timetables, controller: 'lawyers/timetables'
resources :transactions, controller: 'lawyers/transactions', except: [:edit, :update]
resources :educations, controller: 'lawyers/educations'
resources :work_experiences, controller: 'lawyers/work_experiences'
resources :authentications, controller: 'lawyers/authentications', only: [:index, :new, :create]
resources :comments, controller: 'lawyers/comments', only: [:index, :destroy]
resources :ratings, controller: 'lawyers/ratings', except: [:edit, :update]
end
namespace :listens do
resources :taxons
resources :audios
end
namespace :settings do
resources :banners
resources :evaluations
resources :sms_logs, only: [:index, :update, :destroy]
resources :services
resources :admins
resources :questions
resources :categories
end
devise_for :users
devise_for :lawyers
devise_for :admins, path: 'auth',
path_names: { sign_in: 'login', sign_out: 'logout', password: 'secret', confirmation: 'verification', unlock: 'unblock' }
# root 'dashboard#index'
post "/graphql", to: "graphql#execute"
# authenticate :admin do
# mount Sidekiq::Web => "/sidekiq"
# mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graphql"
# end
# match '/404', to: 'errors#not_found', via: :all
# match '/500', to: 'errors#internal_server_error', via: :all
end
I'm using ruby 3.1.2 and here is my app environment:我正在使用 ruby 3.1.2,这是我的应用程序环境:
Gems included by the bundle:
* actioncable (7.0.3)
* actionmailbox (7.0.3)
* actionmailer (7.0.3)
* actionpack (7.0.3)
* actiontext (7.0.3)
* actionview (7.0.3)
* active_storage_validations (0.9.8)
* activejob (7.0.3)
* activemodel (7.0.3)
* activerecord (7.0.3)
* activestorage (7.0.3)
* activesupport (7.0.3)
* airbrussh (1.4.0)
* ancestry (4.2.0)
* auto_increment (1.5.2)
* bcrypt (3.1.17)
* bindex (0.8.1)
* bootsnap (1.11.1)
* builder (3.2.4)
* capistrano (3.17.0)
* capistrano-bundler (2.1.0)
* capistrano-passenger (0.2.1)
* capistrano-rails (1.6.2)
* capistrano-rbenv (2.2.0)
* capistrano-sidekiq (2.3.0)
* childprocess (4.1.0)
* concurrent-ruby (1.1.10)
* connection_pool (2.2.5)
* crass (1.0.6)
* cypress-on-rails (1.13.1)
* database_cleaner-active_record (2.0.1)
* database_cleaner-core (2.0.1)
* datev (0.11.0)
* debug (1.4.0)
* devise (4.8.1)
* digest (3.1.0)
* erubi (1.10.0)
* factory_bot (6.2.1)
* factory_bot_rails (6.2.0)
* faker (2.21.0 4255812)
* ffi (1.15.5)
* globalid (1.0.0)
* graphiql-rails (1.8.0)
* graphql (2.0.11)
* i18n (1.10.0)
* image_processing (1.12.2)
* inline_svg (1.8.0)
* io-console (0.5.11)
* irb (1.4.1)
* jbuilder (2.11.5)
* jsbundling-rails (1.0.2)
* jwt (2.3.0)
* keepr (0.7.0)
* loofah (2.18.0)
* mail (2.7.1)
* marcel (1.0.2)
* method_source (1.0.0)
* mini_magick (4.11.0)
* mini_mime (1.1.2)
* minitest (5.15.0)
* msgpack (1.4.5)
* net-imap (0.2.3)
* net-pop (0.1.1)
* net-protocol (0.1.3)
* net-scp (3.0.0)
* net-smtp (0.3.1)
* net-ssh (6.1.0)
* nio4r (2.5.8)
* nokogiri (1.13.6)
* orm_adapter (0.5.0)
* pagy (5.10.1)
* pg (1.3.5)
* puma (5.6.4)
* racc (1.6.0)
* rack (2.2.3)
* rack-cors (1.1.1)
* rack-test (1.1.0)
* rails (7.0.3)
* rails-dom-testing (2.0.3)
* rails-html-sanitizer (1.4.2)
* railties (7.0.3)
* rake (13.0.6)
* ransack (3.2.1)
* redis (4.6.0)
* reline (0.3.1)
* responders (3.0.1)
* rexml (3.2.5)
* ruby-vips (2.1.4)
* rubyzip (2.3.2)
* sassc (2.4.0)
* sassc-rails (2.1.2)
* selenium-webdriver (4.1.0)
* sidekiq (6.5.1)
* sprockets (4.0.3)
* sprockets-rails (3.4.2)
* sshkit (1.21.2)
* stimulus-rails (1.0.4)
* strscan (3.0.1)
* thor (1.2.1)
* tilt (2.0.10)
* timeout (0.2.0)
* turbo-rails (1.1.1)
* tzinfo (2.0.4)
* view_component (2.57.1)
* warden (1.2.9)
* web-console (4.2.0)
* webdrivers (5.0.0)
* websocket-driver (0.7.5)
* websocket-extensions (0.1.5)
* zeitwerk (2.5.4)
Use `bundle info` to print more detailed information about a gem
Any idea?任何想法?
UPDATED : _breadcrumb.html.erb
更新
_breadcrumb.html.erb
_breadcrumb.html.erb
<nav aria-label="breadcrumb" class="-intro-x h-[45px] mr-auto">
<ol class="breadcrumb breadcrumb-light">
<li class="breadcrumb-item">
<%= link_to "Home", root_path %>
</li>
<% breadcrumbs.each_with_index do |item, index| %>
<% if index == breadcrumbs.size - 1 %>
<li class="breadcrumb-item active" aria-current="page"><%= item.name %></li>
<% else %>
<li class="breadcrumb-item" aria-current="page"><%= link_to item.name, item.path %></li>
<% end %>
<% end %>
</ol>
</nav>
_topbar.html.erb _topbar.html.erb
<!-- BEGIN: Top Bar -->
<div class="top-bar-boxed h-[70px] md:h-[65px] z-[51] border-b border-white/[0.08] -mt-7 md:mt-0 -mx-3 sm:-mx-8 md:-mx-0 px-3 md:border-b-0 relative md:fixed md:inset-x-0 md:top-0 sm:px-8 md:px-10 md:pt-10 md:bg-gradient-to-b md:from-slate-100 md:to-transparent dark:md:from-darkmode-700">
<div class="h-full flex items-center">
<!-- BEGIN: Logo -->
<a href="" class="logo -intro-x hidden md:flex xl:w-[180px] block">
<%= image_tag 'logo.svg', class: 'w-6' %>
<span class="logo__text text-white text-lg ml-3"> Enigma </span>
</a>
<!-- END: Logo -->
<!-- BEGIN: Breadcrumb -->
<%= render partial: 'shared/breadcrumb' %>
<!-- END: Breadcrumb -->
<!-- BEGIN: Account Menu -->
<div class="intro-x dropdown w-8 h-8">
<div class="dropdown-toggle w-8 h-8 rounded-full overflow-hidden shadow-lg image-fit zoom-in scale-110" role="button" aria-expanded="false" data-tw-toggle="dropdown">
<%= image_tag "profile.jpg" %>
</div>
<div class="dropdown-menu w-56">
<ul class="dropdown-content bg-primary/80 before:block before:absolute before:bg-black before:inset-0 before:rounded-md before:z-[-1] text-white">
<li class="p-2">
<div class="font-medium">Arnold Schwarzenegger</div>
<div class="text-xs text-white/60 mt-0.5 dark:text-slate-500">Software Engineer</div>
</li>
<li>
<hr class="dropdown-divider border-white/[0.08]">
</li>
<li>
<a href="" class="dropdown-item hover:bg-white/5"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" icon-name="user" data-lucide="user" class="lucide lucide-user w-4 h-4 mr-2"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg> Profile </a>
</li>
<li>
<a href="" class="dropdown-item hover:bg-white/5"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" icon-name="edit" data-lucide="edit" class="lucide lucide-edit w-4 h-4 mr-2"><path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg> Add Account </a>
</li>
<li>
<a href="" class="dropdown-item hover:bg-white/5"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" icon-name="lock" data-lucide="lock" class="lucide lucide-lock w-4 h-4 mr-2"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0110 0v4"></path></svg> Reset Password </a>
</li>
<li>
<a href="" class="dropdown-item hover:bg-white/5"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" icon-name="help-circle" data-lucide="help-circle" class="lucide lucide-help-circle w-4 h-4 mr-2"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg> Help </a>
</li>
<li>
<hr class="dropdown-divider border-white/[0.08]">
</li>
<li>
<a href="" class="dropdown-item hover:bg-white/5"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" icon-name="toggle-right" data-lucide="toggle-right" class="lucide lucide-toggle-right w-4 h-4 mr-2"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle></svg> Logout </a>
</li>
</ul>
</div>
</div>
<!-- END: Account Menu -->
</div>
</div>
UPDATED: Added full trace更新:添加了完整的跟踪
actionpack (7.0.3) lib/action_dispatch/routing/url_for.rb:169:in `url_for'
actionpack (7.0.3) lib/action_dispatch/routing/route_set.rb:271:in `call'
actionpack (7.0.3) lib/action_dispatch/routing/route_set.rb:214:in `call'
actionpack (7.0.3) lib/action_dispatch/routing/route_set.rb:327:in `block in define_url_helper'
app/views/shared/_breadcrumb.html.erb:4
actionview (7.0.3) lib/action_view/base.rb:244:in `public_send'
actionview (7.0.3) lib/action_view/base.rb:244:in `_run'
actionview (7.0.3) lib/action_view/template.rb:157:in `block in render'
activesupport (7.0.3) lib/active_support/notifications.rb:208:in `instrument'
actionview (7.0.3) lib/action_view/template.rb:361:in `instrument_render_template'
actionview (7.0.3) lib/action_view/template.rb:155:in `render'
actionview (7.0.3) lib/action_view/renderer/partial_renderer.rb:251:in `block in render_partial_template'
activesupport (7.0.3) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.0.3) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (7.0.3) lib/active_support/notifications.rb:206:in `instrument'
actionview (7.0.3) lib/action_view/renderer/partial_renderer.rb:246:in `render_partial_template'
actionview (7.0.3) lib/action_view/renderer/partial_renderer.rb:237:in `render'
actionview (7.0.3) lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
actionview (7.0.3) lib/action_view/renderer/renderer.rb:27:in `render_to_object'
actionview (7.0.3) lib/action_view/renderer/renderer.rb:22:in `render'
actionview (7.0.3) lib/action_view/helpers/rendering_helper.rb:37:in `block in render'
actionview (7.0.3) lib/action_view/base.rb:270:in `in_rendering_context'
actionview (7.0.3) lib/action_view/helpers/rendering_helper.rb:33:in `render'
app/views/shared/_topbar.html.erb:11
actionview (7.0.3) lib/action_view/base.rb:244:in `public_send'
actionview (7.0.3) lib/action_view/base.rb:244:in `_run'
actionview (7.0.3) lib/action_view/template.rb:157:in `block in render'
activesupport (7.0.3) lib/active_support/notifications.rb:208:in `instrument'
actionview (7.0.3) lib/action_view/template.rb:361:in `instrument_render_template'
actionview (7.0.3) lib/action_view/template.rb:155:in `render'
actionview (7.0.3) lib/action_view/renderer/partial_renderer.rb:251:in `block in render_partial_template'
activesupport (7.0.3) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.0.3) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (7.0.3) lib/active_support/notifications.rb:206:in `instrument'
actionview (7.0.3) lib/action_view/renderer/partial_renderer.rb:246:in `render_partial_template'
actionview (7.0.3) lib/action_view/renderer/partial_renderer.rb:237:in `render'
actionview (7.0.3) lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
actionview (7.0.3) lib/action_view/renderer/renderer.rb:27:in `render_to_object'
actionview (7.0.3) lib/action_view/renderer/renderer.rb:22:in `render'
actionview (7.0.3) lib/action_view/helpers/rendering_helper.rb:37:in `block in render'
actionview (7.0.3) lib/action_view/base.rb:270:in `in_rendering_context'
actionview (7.0.3) lib/action_view/helpers/rendering_helper.rb:33:in `render'
app/views/layouts/application.html.erb:17
actionview (7.0.3) lib/action_view/base.rb:244:in `public_send'
actionview (7.0.3) lib/action_view/base.rb:244:in `_run'
actionview (7.0.3) lib/action_view/template.rb:157:in `block in render'
activesupport (7.0.3) lib/active_support/notifications.rb:208:in `instrument'
actionview (7.0.3) lib/action_view/template.rb:361:in `instrument_render_template'
actionview (7.0.3) lib/action_view/template.rb:155:in `render'
actionview (7.0.3) lib/action_view/renderer/template_renderer.rb:76:in `block in render_with_layout'
activesupport (7.0.3) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.0.3) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (7.0.3) lib/active_support/notifications.rb:206:in `instrument'
actionview (7.0.3) lib/action_view/renderer/template_renderer.rb:74:in `render_with_layout'
actionview (7.0.3) lib/action_view/renderer/template_renderer.rb:59:in `render_template'
actionview (7.0.3) lib/action_view/renderer/template_renderer.rb:11:in `render'
actionview (7.0.3) lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
actionview (7.0.3) lib/action_view/renderer/renderer.rb:29:in `render_to_object'
actionview (7.0.3) lib/action_view/rendering.rb:117:in `block in _render_template'
actionview (7.0.3) lib/action_view/base.rb:270:in `in_rendering_context'
actionview (7.0.3) lib/action_view/rendering.rb:116:in `_render_template'
actionpack (7.0.3) lib/action_controller/metal/streaming.rb:216:in `_render_template'
actionview (7.0.3) lib/action_view/rendering.rb:103:in `render_to_body'
actionpack (7.0.3) lib/action_controller/metal/rendering.rb:46:in `render_to_body'
actionpack (7.0.3) lib/action_controller/metal/renderers.rb:141:in `render_to_body'
actionpack (7.0.3) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (7.0.3) lib/action_controller/metal/rendering.rb:30:in `render'
actionpack (7.0.3) lib/action_controller/metal/instrumentation.rb:22:in `block (2 levels) in render'
/Users/zoloo/.rbenv/versions/3.1.2/lib/ruby/3.1.0/benchmark.rb:311:in `realtime'
activesupport (7.0.3) lib/active_support/core_ext/benchmark.rb:14:in `ms'
actionpack (7.0.3) lib/action_controller/metal/instrumentation.rb:22:in `block in render'
actionpack (7.0.3) lib/action_controller/metal/instrumentation.rb:91:in `cleanup_view_runtime'
activerecord (7.0.3) lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
actionpack (7.0.3) lib/action_controller/metal/instrumentation.rb:21:in `render'
actionpack (7.0.3) lib/action_controller/metal/implicit_render.rb:35:in `default_render'
actionpack (7.0.3) lib/action_controller/metal/basic_implicit_render.rb:6:in `block in send_action'
<internal:kernel>:90:in `tap'
actionpack (7.0.3) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (7.0.3) lib/abstract_controller/base.rb:215:in `process_action'
actionpack (7.0.3) lib/action_controller/metal/rendering.rb:53:in `process_action'
actionpack (7.0.3) lib/abstract_controller/callbacks.rb:234:in `block in process_action'
activesupport (7.0.3) lib/active_support/callbacks.rb:118:in `block in run_callbacks'
actiontext (7.0.3) lib/action_text/rendering.rb:20:in `with_renderer'
actiontext (7.0.3) lib/action_text/engine.rb:69:in `block (4 levels) in <class:Engine>'
activesupport (7.0.3) lib/active_support/callbacks.rb:127:in `instance_exec'
activesupport (7.0.3) lib/active_support/callbacks.rb:127:in `block in run_callbacks'
activesupport (7.0.3) lib/active_support/callbacks.rb:138:in `run_callbacks'
actionpack (7.0.3) lib/abstract_controller/callbacks.rb:233:in `process_action'
actionpack (7.0.3) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (7.0.3) lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'
activesupport (7.0.3) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.0.3) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (7.0.3) lib/active_support/notifications.rb:206:in `instrument'
actionpack (7.0.3) lib/action_controller/metal/instrumentation.rb:66:in `process_action'
actionpack (7.0.3) lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
activerecord (7.0.3) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (7.0.3) lib/abstract_controller/base.rb:151:in `process'
actionview (7.0.3) lib/action_view/rendering.rb:39:in `process'
actionpack (7.0.3) lib/action_controller/metal.rb:188:in `dispatch'
actionpack (7.0.3) lib/action_controller/metal.rb:251:in `dispatch'
actionpack (7.0.3) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (7.0.3) lib/action_dispatch/routing/route_set.rb:32:in `serve'
actionpack (7.0.3) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (7.0.3) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (7.0.3) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (7.0.3) lib/action_dispatch/routing/route_set.rb:852:in `call'
warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
warden (1.2.9) lib/warden/manager.rb:34:in `catch'
warden (1.2.9) lib/warden/manager.rb:34:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/etag.rb:27:in `call'
rack (2.2.3) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.3) lib/rack/head.rb:12:in `call'
actionpack (7.0.3) lib/action_dispatch/http/permissions_policy.rb:38:in `call'
actionpack (7.0.3) lib/action_dispatch/http/content_security_policy.rb:36:in `call'
rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (7.0.3) lib/action_dispatch/middleware/cookies.rb:697:in `call'
actionpack (7.0.3) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (7.0.3) lib/active_support/callbacks.rb:99:in `run_callbacks'
actionpack (7.0.3) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (7.0.3) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
actionpack (7.0.3) lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
actionpack (7.0.3) lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
railties (7.0.3) lib/rails/rack/logger.rb:40:in `call_app'
railties (7.0.3) lib/rails/rack/logger.rb:25:in `block in call'
activesupport (7.0.3) lib/active_support/tagged_logging.rb:114:in `block in tagged'
activesupport (7.0.3) lib/active_support/tagged_logging.rb:38:in `tagged'
activesupport (7.0.3) lib/active_support/tagged_logging.rb:114:in `tagged'
railties (7.0.3) lib/rails/rack/logger.rb:25:in `call'
actionpack (7.0.3) lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
actionpack (7.0.3) lib/action_dispatch/middleware/request_id.rb:26:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
actionpack (7.0.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
actionpack (7.0.3) lib/action_dispatch/middleware/host_authorization.rb:131:in `call'
rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
railties (7.0.3) lib/rails/engine.rb:530:in `call'
puma (5.6.4) lib/puma/configuration.rb:252:in `call'
puma (5.6.4) lib/puma/request.rb:77:in `block in handle_request'
puma (5.6.4) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
puma (5.6.4) lib/puma/request.rb:76:in `handle_request'
puma (5.6.4) lib/puma/server.rb:441:in `process_client'
puma (5.6.4) lib/puma/thread_pool.rb:147:in `block in spawn_thread'
Hold the door.抓住门。 Ain't the syntax for root in routes.rb file:
不是 routes.rb 文件中 root 的语法:
root to: 'dashboard#index'
https://guides.rubyonrails.org/routing.html https://guides.rubyonrails.org/routing.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.