前提・実現したいこと
blogサイトを作成したいと考えています。
作成するにあたり、localhost:3000にてindex.htmlの画面を表示したいのですが、エラーとなってしまいます。
フォルダ名articlesです。
発生している問題・エラーメッセージ
Puma caught this error: uninitialized constant ActionText::Engine::ApplicationController (NameError)
Puma caught this error: uninitialized constant ActionText::Engine::ApplicationController (NameError) /Library/Ruby/Gems/2.6.0/gems/actiontext-6.0.3.2/lib/action_text/engine.rb:47:in `block (2 levels) in <class:Engine>' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:428:in `instance_exec' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:428:in `block in make_lambda' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:200:in `block (2 levels) in halting' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:605:in `block (2 levels) in default_terminator' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:604:in `catch' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:604:in `block in default_terminator' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:201:in `block in halting' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:513:in `block in invoke_before' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:513:in `each' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:513:in `invoke_before' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:134:in `run_callbacks' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/execution_wrapper.rb:119:in `complete!' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/execution_wrapper.rb:76:in `ensure in block in run!' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/execution_wrapper.rb:76:in `block in run!' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/execution_wrapper.rb:70:in `tap' /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/execution_wrapper.rb:70:in `run!' /Library/Ruby/Gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/executor.rb:12:in `call' /Library/Ruby/Gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/static.rb:126:in `call' /Library/Ruby/Gems/2.6.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call' /Library/Ruby/Gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/host_authorization.rb:82:in `call' /Library/Ruby/Gems/2.6.0/gems/webpacker-4.2.2/lib/webpacker/dev_server_proxy.rb:23:in `perform_request' /Library/Ruby/Gems/2.6.0/gems/rack-proxy-0.6.5/lib/rack/proxy.rb:57:in `call' /Library/Ruby/Gems/2.6.0/gems/railties-6.0.3.2/lib/rails/engine.rb:527:in `call' /Library/Ruby/Gems/2.6.0/gems/puma-4.3.5/lib/puma/configuration.rb:228:in `call' /Library/Ruby/Gems/2.6.0/gems/puma-4.3.5/lib/puma/server.rb:713:in `handle_request' /Library/Ruby/Gems/2.6.0/gems/puma-4.3.5/lib/puma/server.rb:472:in `process_client' /Library/Ruby/Gems/2.6.0/gems/puma-4.3.5/lib/puma/server.rb:328:in `block in run' /Library/Ruby/Gems/2.6.0/gems/puma-4.3.5/lib/puma/thread_pool.rb:134:in `block in spawn_thread'
該当するコード
routes.rb Rails.application.routes.draw do resources :articles root "articles#index" # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html end
articles_controller.rb class ArticlesController < ApplicationController def index end def show end def edit end def new end end
調べたところこのエラーはクラスの表記をしていない場合に発生するエラーのようですが、クラス表記等のミスを見つけることが出来ませんでした。よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。