Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redmine 4.1.1 Install Error #18

Open
itmuji opened this issue Oct 19, 2020 · 1 comment
Open

Redmine 4.1.1 Install Error #18

itmuji opened this issue Oct 19, 2020 · 1 comment

Comments

@itmuji
Copy link

itmuji commented Oct 19, 2020

If you install the plugin and restart the apache service, a Remine error occurs.
Please tell me how to solve this problem.

====================================================================================================
The Phusion Passenger application server tried to start the web application. But the application itself (and not Passenger) encountered an internal error.

Error details:

undefined method before_filter' for AttachmentsController:Class Did you mean? before_action (NoMethodError) /var/www/html/redmine/plugins/redmine_s3/lib/redmine_s3/attachments_controller_patch.rb:10:in block in included'
/var/www/html/redmine/plugins/redmine_s3/lib/redmine_s3/attachments_controller_patch.rb:8:in class_eval' /var/www/html/redmine/plugins/redmine_s3/lib/redmine_s3/attachments_controller_patch.rb:8:in included'
/var/www/html/redmine/plugins/redmine_s3/lib/redmine_s3.rb:7:in include' /var/www/html/redmine/plugins/redmine_s3/lib/redmine_s3.rb:7:in <top (required)>'
/usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in require' /usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in block in require'
/usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:257:in load_dependency' /usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in require'
/var/www/html/redmine/plugins/redmine_s3/init.rb:1:in <top (required)>' /usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in require'
/usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in block in require' /usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:257:in load_dependency'
/usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in require' /var/www/html/redmine/lib/redmine/plugin.rb:181:in block in load'
/var/www/html/redmine/lib/redmine/plugin.rb:172:in each' /var/www/html/redmine/lib/redmine/plugin.rb:172:in load'
/var/www/html/redmine/config/initializers/30-redmine.rb:20:in <top (required)>' /usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:285:in load'
/usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:285:in block in load' /usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:257:in load_dependency'
/usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:285:in load' /usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/engine.rb:663:in block in load_config_initializer'
/usr/lib64/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/notifications.rb:170:in instrument' /usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/engine.rb:662:in load_config_initializer'
/usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/engine.rb:620:in block (2 levels) in <class:Engine>' /usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/engine.rb:619:in each'
/usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/engine.rb:619:in block in <class:Engine>' /usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/initializable.rb:32:in instance_exec'
/usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/initializable.rb:32:in run' /usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/initializable.rb:61:in block in run_initializers'
/usr/lib64/ruby/2.6.0/tsort.rb:228:in block in tsort_each' /usr/lib64/ruby/2.6.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component'
/usr/lib64/ruby/2.6.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from' /usr/lib64/ruby/2.6.0/tsort.rb:431:in each_strongly_connected_component_from'
/usr/lib64/ruby/2.6.0/tsort.rb:421:in block in each_strongly_connected_component_from' /usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/initializable.rb:50:in each'
/usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/initializable.rb:50:in tsort_each_child' /usr/lib64/ruby/2.6.0/tsort.rb:415:in call'
/usr/lib64/ruby/2.6.0/tsort.rb:415:in each_strongly_connected_component_from' /usr/lib64/ruby/2.6.0/tsort.rb:349:in block in each_strongly_connected_component'
/usr/lib64/ruby/2.6.0/tsort.rb:347:in each' /usr/lib64/ruby/2.6.0/tsort.rb:347:in call'
/usr/lib64/ruby/2.6.0/tsort.rb:347:in each_strongly_connected_component' /usr/lib64/ruby/2.6.0/tsort.rb:226:in tsort_each'
/usr/lib64/ruby/2.6.0/tsort.rb:205:in tsort_each' /usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/initializable.rb:60:in run_initializers'
/usr/lib64/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/application.rb:361:in initialize!' /var/www/html/redmine/config/environment.rb:16:in <top (required)>'
config.ru:3:in require' config.ru:3:in block in

'
/usr/lib64/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in instance_eval' /usr/lib64/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in initialize'
config.ru:1:in new' config.ru:1:in '
/usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.6/src/helper-scripts/rack-preloader.rb:101:in eval' /usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.6/src/helper-scripts/rack-preloader.rb:101:in preload_app'
/usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.6/src/helper-scripts/rack-preloader.rb:189:in block in <module:App>' /usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.6/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:378:in run_block_and_record_step_progress'
/usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.6/src/helper-scripts/rack-preloader.rb:188:in <module:App>' /usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.6/src/helper-scripts/rack-preloader.rb:30:in module:PhusionPassenger'
/usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.6/src/helper-scripts/rack-preloader.rb:29:in `'

@benwong1001
Copy link

try:
in attachments_controller_patch.rb
change all before_filter to before_action

if Rails::VERSION::MAJOR >= 5
in application_helper_patch.rb try to change
alias_method_chain :thumbnail_tag, :s3_patch
to
alias_method :thumbnail_tag_without_s3_patch, :thumbnail_tag
alias_method :thumbnail_tag, :thumbnail_tag_with_s3_patch

see if that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants