How can I force my plugin to reload with each request?

后端 未结 6 508
离开以前
离开以前 2020-12-17 14:43

As I understand it, plugins are not reloaded in Rails with each request in development mode. Which makes sense, as generally you add plugins to your app and it\'s the app yo

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-17 14:48

    With https://github.com/ranmocy/guard-rails, it's super easy:

    # Gemfile.local
    gem 'guard-rails'
    
    
    $ bundle
    $ guard init rails
    
    
    # Guardfile:
    guard 'rails' do
      watch('Gemfile.lock')
      watch(%r{^(config|plugins)/.*})
    end
    
    
    $ bundle exec guard
    

提交回复
热议问题