0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Railsサーバー起動時にLoadErrorが発生した

Posted at

いつも通り何気なくrails sでサーバー起動しようとした際、なぜかいきなりLoadErrorが表示されました。

色々なサイトを見ていると、pumaの再インストールやバージョンの書き換えなどで解決しているものもありましたが、私の場合は該当しませんでした。
とは言ってもとても簡単にエラー解決できたので、備忘録として残しておきます。

結論、 ApplicationsControllerがおかしくなっていたので、そこを修正すればきちんと起動するようになりました。

エラー内容を確認すると、「Unable to autoload constant ApplicationsController ~」となっていたので、 ApplicationControllerを一度確認しました。

すると一度目では発見できなかったのですが、よく見てみるとclass以降の表記が変わっていました。

application_controller.rb
class ApplicationsController < ActionController::Base 

end

正しくは、

application_controller.rb
# ApplicationsControllerのsを削除
class ApplicationController < ActionController::Base 

end

この修正によってきちんと起動できるようになりました。

なぜ書き変わっていたのかは不明のため、原因が分かる方いらっしゃれば教えていただきたいです。。。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?