0
1

More than 3 years have passed since last update.

【Rails6】rails sでサーバーを起動したまま、コードの書き換え、動作確認をしたい

Posted at

ハードは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ボタンをポチッと押していただけると嬉しいです:raised_hand_tone1:

0
1
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
1