放弃这个问题了,,因为直接部署在 ubuntu 已经不是 discourse 官方支持的做法。乖乖用 docker.io 部署了
#5 楼 @cassiuschen RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ROOT=/var/www/discourse RAILS_ENV=production NUM_WEBS=2 bluepill --no-privileged -c ~/.bluepill load /var/www/discourse/config/discourse.pill
#1 楼 @cassiuschen 谢谢,我在 discourse.conf 找到了 db_password 的配置。然后运行页面变成 500 了,看到 production_errors.log 错误日志为:
……
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:80:in catch'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:80:in
pre_process'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:55:in process'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:41:in
receive_data'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in run_machine'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in
run'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/lib/thin/backends/base.rb:73:in start'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/lib/thin/server.rb:162:in
start'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/lib/thin/controllers/controller.rb:87:in start'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/lib/thin/runner.rb:200:in
run_command'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/lib/thin/runner.rb:156:in run!'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/bin/thin:6:in
<top (required)>'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/bin/thin:23:in load'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/bin/thin:23:in
<main>'
ERROR: relation "groups" does not exist
LINE 5: WHERE a.attrelid = '"groups"'::regclass
^
http://localhost:3021/
PG::Error