我们已将 Discourse docker 升级到 master 分支,并尝试为最新更新重新构建 Docker 镜像,但现在遇到了常量名称错误的报错。请查看下方的堆栈跟踪:
1: rails_multisite (2.0.7) from /var/www/discourse/vendor/bundle/ruby/2.6.0/specifications/rails_multisite-2.0.7.gemspec
Bundle complete! 120 Gemfile dependencies, 157 gems now installed.
Gems in the groups test and development were not installed.
Bundled gems are installed into `./vendor/bundle`
I, [2019-09-24T05:09:04.662043 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
NameError: wrong constant name [[:error, ["detected unsupported rails version 6.0.0"], nil]]
/var/www/discourse/plugins/new_relic-discourse/gems/2.6.4/gems/newrelic_rpm-5.4.0.347/lib/new_relic/control/class_methods.rb:52:in `const_get'
/var/www/discourse/plugins/new_relic-discourse/gems/2.6.4/gems/newrelic_rpm-5.4.0.347/lib/new_relic/control/class_methods.rb:52:in `load_framework_class'
/var/www/discourse/plugins/new_relic-discourse/gems/2.6.4/gems/newrelic_rpm-5.4.0.347/lib/new_relic/control/class_methods.rb:32:in `new_instance'
/var/www/discourse/plugins/new_relic-discourse/gems/2.6.4/gems/newrelic_rpm-5.4.0.347/lib/new_relic/control/class_methods.rb:13:in `instance'
/var/www/discourse/plugins/new_relic-discourse/plugin.rb:9:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:494:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:494:in `activate!'
lib/discourse.rb:171:in `block in activate_plugins!'
lib/discourse.rb:168:in `each'
lib/discourse.rb:168:in `activate_plugins!'
/var/www/discourse/config/application.rb:261:in `<class:Application>'
/var/www/discourse/config/application.rb:58:in `<module:Discourse>'
/var/www/discourse/config/application.rb:57:in `<top (required)>'
/var/www/discourse/Rakefile:7:in `require'
/var/www/discourse/Rakefile:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)
I, [2019-09-24T05:09:12.600060 #1] INFO -- : gem install newrelic_rpm -v 5.4.0.347 -i /var/www/discourse/plugins/new_relic-discourse/gems/2.6.4 --no-document --ignore-dependencies --no-user-install
Successfully installed newrelic_rpm-5.4.0.347
1 gem installed
I, [2019-09-24T05:09:12.600340 #1] INFO -- : Terminating async processes
I, [2019-09-24T05:09:12.600566 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 50
I, [2019-09-24T05:09:12.600630 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 167
167:signal-handler (1569301752) Received SIGTERM scheduling shutdown...
2019-09-24 05:09:12.600 UTC [50] LOG: received fast shutdown request
2019-09-24 05:09:12.603 UTC [50] LOG: aborting any active transactions
2019-09-24 05:09:12.606 UTC [50] LOG: worker process: logical replication launcher (PID 59) exited with exit code 1
2019-09-24 05:09:12.607 UTC [54] LOG: shutting down
2019-09-24 05:09:12.626 UTC [50] LOG: database system is shut down
167:M 24 Sep 2019 05:09:12.656 # User requested shutdown...
167:M 24 Sep 2019 05:09:12.656 * Saving the final RDB snapshot before exiting.
167:M 24 Sep 2019 05:09:13.094 * DB saved on disk
167:M 24 Sep 2019 05:09:13.094 # Redis is now ready to exit, bye bye...
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 423 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
772fd9749450a9f60c0342e5a823426fb81efb1ab8a83546cc38fdfddd5d8cc6
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.