southbridgeio / redmine_2fa

Two-factor (sms/telegram) authentication for Redmine
https://southbridge.io
MIT License
42 stars 17 forks source link

ActionController::RoutingError #80

Closed oliu321 closed 4 years ago

oliu321 commented 4 years ago

I got the following error, any idea? ActionController::RoutingError (No route matches [GET] "/plugin_assets/redmine_2fa/javascripts/redmine_2fa.js"): actionpack (4.2.11.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:incall' actionpack (4.2.11.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in call' railties (4.2.11.1) lib/rails/rack/logger.rb:38:incall_app' railties (4.2.11.1) lib/rails/rack/logger.rb:20:in block in call' activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:68:inblock in tagged' activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:26:in tagged' activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:68:intagged' railties (4.2.11.1) lib/rails/rack/logger.rb:20:in call' request_store (1.4.1) lib/request_store/middleware.rb:19:incall' actionpack (4.2.11.1) lib/action_dispatch/middleware/request_id.rb:21:in call' rack (1.6.11) lib/rack/methodoverride.rb:22:incall' rack (1.6.11) lib/rack/runtime.rb:18:in call' activesupport (4.2.11.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall' actionpack (4.2.11.1) lib/action_dispatch/middleware/static.rb:120:in call' rack (1.6.11) lib/rack/content_length.rb:15:incall' rack (1.6.11) lib/rack/sendfile.rb:113:in call' railties (4.2.11.1) lib/rails/engine.rb:518:incall' railties (4.2.11.1) lib/rails/application.rb:165:in call' railties (4.2.11.1) lib/rails/railtie.rb:194:inpublic_send' railties (4.2.11.1) lib/rails/railtie.rb:194:in method_missing' /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:inprocess_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:152:in accept_and_process_next_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:113:inmain_loop' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:416:in block (3 levels) in start_threads' /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:inblock in create_thread_and_abort_on_exception'

Started GET "/pm/plugin_assets/redmine_2fa/stylesheets/redmine_2fa.css" for 108.30.103.87 at 2019-11-06 15:51:02 -0500

ActionController::RoutingError (No route matches [GET] "/plugin_assets/redmine_2fa/stylesheets/redmine_2fa.css"): actionpack (4.2.11.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (4.2.11.1) lib/action_dispatch/middleware/show_exceptions.rb:30:incall' railties (4.2.11.1) lib/rails/rack/logger.rb:38:in call_app' railties (4.2.11.1) lib/rails/rack/logger.rb:20:inblock in call' activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:68:in block in tagged' activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:26:intagged' activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:68:in tagged' railties (4.2.11.1) lib/rails/rack/logger.rb:20:incall' request_store (1.4.1) lib/request_store/middleware.rb:19:in call' actionpack (4.2.11.1) lib/action_dispatch/middleware/request_id.rb:21:incall' rack (1.6.11) lib/rack/methodoverride.rb:22:in call' rack (1.6.11) lib/rack/runtime.rb:18:incall' activesupport (4.2.11.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call' actionpack (4.2.11.1) lib/action_dispatch/middleware/static.rb:120:incall' rack (1.6.11) lib/rack/content_length.rb:15:in call' rack (1.6.11) lib/rack/sendfile.rb:113:incall' railties (4.2.11.1) lib/rails/engine.rb:518:in call' railties (4.2.11.1) lib/rails/application.rb:165:incall' railties (4.2.11.1) lib/rails/railtie.rb:194:in public_send' railties (4.2.11.1) lib/rails/railtie.rb:194:inmethod_missing' /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in process_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:152:inaccept_and_process_next_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:113:in main_loop' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:416:inblock (3 levels) in start_threads' /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in block in create_thread_and_abort_on_exception'

oliu321 commented 4 years ago

My environment is using passenger behind Apache who is doing the SSL offloading, plus I used a symbol link from /var/www/pm to the /usr/share/redmine/public . Just in case it matters.

vladislav-yashin commented 4 years ago

Please, run RAILS_ENV=production bundle exec rake redmine:plugins:assets

I guess, we should mention it in Readme

oliu321 commented 4 years ago

Tried that, but doesn't work, probably because I already did RAILS_ENV=production bundle exec rake redmine:plugins:migrate a long time ago. Anyway I solved the problem by manually copying the assets from the plugin directory to public/plugin_assets and now the problem disappeared, thanks.

vladislav-yashin commented 4 years ago

RAILS_ENV=production bundle exec rake redmine:plugins:migrate

Please, check my comment again. There's another command (I mistyped in my initial comment).

Anyway I solved the problem by manually copying the assets from the plugin directory to public/plugin_assets

rake redmine:plugins:assets does the same thing anyway. Glad your problem is solved!