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
This solution, for engines, works on Rails 2.3 but comes with one cavaet, it will load all files in the engine and parent app on every request which will make response times slower.
# lib/my_engine/engine.rb
if ENV['RELOAD_MYENGINE'] && Rails.env.development?
config.to_prepare do
Rails.logger.debug "RELOADING MY ENGINE"
require_dependency MyEngine::Engine.root.join('lib', 'my_engine').to_s
end
config.after_initialize do
Rails.application.config.reload_classes_only_on_change = false
end
Then start the server:
RELOAD_MYENGINE=1 rails server