我收到一个奇怪的错误。安装后,redmine应用程序可以正常运行。
当我重命名WikiContentVersion
之类的WikiContentVersion1
类时,它会像我们期望的那样失败。但是,当我将名称恢复为WikiContentVersion
时,会引发错误:
未捕获的异常:无法自动加载常量
WikiContentVersion
,期望........对其进行定义。
有人可以给我一些建议吗?
Redmine 4.0.3,
ruby 2.5.5p157 (2019-03-15 revision 67260) [i386-mingw32].
Rails 5.2.3
mysql-5.5.62-winx64
windows10
ast Debugger (ruby-debug-ide 0.7.0.beta6, debase 0.2.3.beta2, file filtering is supported) listens on 0.0.0.0:58519
=> Booting WEBrick
=> Rails 5.2.3 application starting in production on http://127.0.0.1:3000
=> Run `rails server -h` for more startup options
Exiting
Uncaught exception: Unable to autoload constant WikiContentVersion, expected F:/webpage/redmine-4.0.3/app/models/wiki_content_version.rb to define it
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:511:in `load_missing_constant'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:195:in `const_missing'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:542:in `load_missing_constant'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:195:in `const_missing'
F:/webpage/redmine-4.0.3/app/models/wiki_content.rb:102:in `<class:WikiContent>'
F:/webpage/redmine-4.0.3/app/models/wiki_content.rb:20:in `<top (required)>'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:378:in `block in require_or_load'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:37:in `block in load_interlock'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:13:in `loading'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:37:in `load_interlock'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:356:in `require_or_load'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:334:in `depend_on'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:246:in `require_dependency'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:478:in `block (2 levels) in eager_load!'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:477:in `each'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:477:in `block in eager_load!'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:475:in `each'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:475:in `eager_load!'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:356:in `eager_load!'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/application/finisher.rb:69:in `each'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers'
F:/Ruby25/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
F:/Ruby25/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
F:/Ruby25/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
F:/Ruby25/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
F:/Ruby25/lib/ruby/2.5.0/tsort.rb:347:in `each'
F:/Ruby25/lib/ruby/2.5.0/tsort.rb:347:in `call'
F:/Ruby25/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
F:/Ruby25/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
F:/Ruby25/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:60:in `run_initializers'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/application.rb:361:in `initialize!'
F:/webpage/redmine-4.0.3/config/environment.rb:14:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `instance_eval'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `initialize'
config.ru:in `new'
config.ru:in `<main>'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `eval'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `new_from_string'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.7/lib/rack/builder.rb:40:in `parse_file'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.7/lib/rack/server.rb:319:in `build_app_and_options_from_config'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.7/lib/rack/server.rb:219:in `app'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:27:in `app'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.7/lib/rack/server.rb:354:in `wrapped_app'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.7/lib/rack/server.rb:283:in `start'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:53:in `start'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:147:in `block in perform'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
F:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>'
F:/webpage/redmine-4.0.3/bin/rails:4:in `require'
F:/webpage/redmine-4.0.3/bin/rails:4:in `<top (required)>'