我运行了 ./discourse-setup,回答了问题并等待。我的终端在以下行卡住:#<Thread:0x00005621595f3360@/var/www/discourse/lib/tasks/assets.rake:215 run> terminated with exception (report_on_exception is true):。唯一能释放终端的方法是关闭 SSH 连接并重新连接。
我对 Linux 只有基本了解。
使用 apt-get 更新系统并未带来任何改变。
我发现安装程序在 assets:precompile 任务处卡住。异常来自 /var/www/discourse/lib/tasks/assets.rake:227:in rescue in block (2 levels) in <top (required)>': undefined local variable or method'name' for main:Object (NameError)。
#<Thread:0x000055c07c7e8cf8@/var/www/discourse/lib/tasks/assets.rake:215 run> terminated with exception (report_on_exceptionis true):
/var/www/discourse/lib/tasks/assets.rake:227:in `rescue in block (2 levels) in <top (required)>':undefined local variable or method`name' for main:Object (NameError)
from /var/www/discourse/lib/tasks/assets.rake:216:in `block (2 levels) in <top (required)>' /var/www/discourse/lib/file_helper.rb:55:in `block in download':
403 Error:<BINARY_DATA> (OpenURI::HTTPError) <BINARY_DATA>
from /var/www/discourse/lib/final_destination.rb:400:in `block (3 levels) in safe_get'
from /var/www/discourse/lib/final_destination.rb:399:in `catch'
from /var/www/discourse/lib/final_destination.rb:399:in `block (2 levels) in safe_get'
from /usr/local/lib/ruby/2.6.0/net/http.rb:1518:in `block in transport_request'
from /usr/local/lib/ruby/2.6.0/net/http/response.rb:165:in `reading_body'
from /usr/local/lib/ruby/2.6.0/net/http.rb:1517:in `transport_request'
from /usr/local/lib/ruby/2.6.0/net/http.rb:1479:in `request'
from /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-1.0.2/lib/patches/net_patches.rb:9:in `block in request_with_mini_profiler'
from /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-1.0.2/lib/mini_profiler/profiling_methods.rb:39:in `step'
from /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-1.0.2/lib/patches/net_patches.rb:8:in `request_with_mini_profiler'
from /var/www/discourse/lib/final_destination.rb:371:in `block in safe_get'
from /var/www/discourse/lib/final_destination.rb:415:in `block in safe_session'
from /usr/local/lib/ruby/2.6.0/net/http.rb:920:in `start'
from /usr/local/lib/ruby/2.6.0/net/http.rb:605:in `start'
from /var/www/discourse/lib/final_destination.rb:412:in `safe_session'
from /var/www/discourse/lib/final_destination.rb:363:in `safe_get'
from /var/www/discourse/lib/final_destination.rb:129:in `get'
from /var/www/discourse/lib/file_helper.rb:47:in `download'
from /var/www/discourse/lib/discourse_ip_info.rb:30:in `mmdb_download'
from /var/www/discourse/lib/tasks/assets.rake:218:in `block (3 levels) in <top (required)>'
from /var/www/discourse/lib/tasks/assets.rake:217:in `each'
from /var/www/discourse/lib/tasks/assets.rake:217:in `block (2 levels) in <top (required)>'
安装程序随后执行了一些任务,过程中未出现问题。但在流程结束时出现以下错误:
FAILED--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile'
failed with return #<Process::Status: pid 384 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'..exec
failed with the params {"cd"=>"$home", "hook"=>"assets_precompile",
"cmd"=>["su discourse -c 'bundle exec rake assets:precompile'"]}
f534324ceedf6b1a8a5cc89f38e1c12c2418fb69c71f93f21c0dd2f5ef51483d
** 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.