Rails server doesn't see code changes and reload files

前端 未结 5 1297
走了就别回头了
走了就别回头了 2020-12-24 14:12

I noticed that my rails server doesn\'t reload controllers, models and probably any other files after I change them. I use Vagrant and Rails API, and I found that some peopl

5条回答
  •  时光说笑
    2020-12-24 14:47

    This worked for me with ruby 2.6.5 and Rails 5.2.4.1.:

    Add the following line in config/environments/development.rb:

    config.file_watcher = ActiveSupport::EventedFileUpdateChecker
    

    along with

    config.cache_classes = false
    

    in the same file, and

    gem 'listen'
    

    in the :development group in Gemfile.

提交回复
热议问题