LoginSignup
55

More than 5 years have passed since last update.

Rails5でmodelやcontrollerの修正が反映されないやつ

Posted at

環境

docker for mac
rails5.0
Debian GNU/Linux 8
developmentモード

困ったこと

modelやcontrollerの修正が反映されない。
Viewはすぐに反映される。

解決法1

rails restartしたりコンテナを再起動すれば反映される
(面倒くさ)

解決法2

development.rbに以下を追加

  config.cache_classes = false
  config.reload_classes_only_on_change = false

結果

すぐに反映されるようになった。わーいヾ( ゚д゚)人( ゚д゚)ノ゙

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
55