ハードはMacBook Air, 開発環境はVScodeを用いています。
ruby2.6.5
rails6.0.3.2
発生している問題
rails s でサーバーを起動させた状態でコードを変更しても、サーバーを再起動しなければ変更が反映されない
原因
config/environments/development.rbの記述が原因です。
config/environments/development.rb
Rails.application.configure do
〜省略〜
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
end
対処法
次のように書き換えます。
config/environments/development.rb
Rails.application.configure do
〜省略〜
config.file_watcher = ActiveSupport::FileUpdateChecker
end
これで解決します。
役に立ったら是非LGTMボタンをポチッと押していただけると嬉しいです