redmine_better_files
redmine_better_files copied to clipboard
dispacher
What to do with: no such file to load -- dispatcher
It happens so often with many plugins.
I got this error fixed, but this plugin has more outdated code #2
diff --git a/init.rb b/init.rb
index 06a826b..53e343d 100644
--- a/init.rb
+++ b/init.rb
@@ -1,14 +1,15 @@
require 'redmine'
-require 'dispatcher'
+#require 'dispatcher'
Dir[File.join(directory,'vendor','plugins','*')].each do |dir|
path = File.join(dir, 'lib')
$LOAD_PATH << path
- ActiveSupport::Dependencies.load_paths << path
- ActiveSupport::Dependencies.load_once_paths.delete(path)
+ ActiveSupport::Dependencies.autoload_paths << path
+ ActiveSupport::Dependencies.autoload_once_paths.delete(path)
end
-Dispatcher.to_prepare :redmine_better_files do
+#Dispatcher.to_prepare :redmine_better_files do
+ActionDispatch::Callbacks.to_prepare do
require_dependency 'attachments_controller'
unless Attachment.included_modules.include? RedmineBetterFiles::AttachmentPatch