好的,我已经进入下一步。上面有人发帖说我们需要在容器的 /var/www/discourse 文件夹中,然后添加 gem。
现在是最后一步
RAILS_ENV=production bundle exec ruby script/import_scripts/xenforo.rb
我收到了这个错误。我可能做错了什么?
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:63:in "rescue in new_client": We could not find your database: discourse. Available database configurations can be found in config/database.yml. (ActiveRecord::NoDatabaseError)To resolve this error:- Did you not create the database, or did you delete it? To create the database, run: bin/rails db:create- Has the database name changed? Verify that config/database.yml contains the correct database name.
已解决:我之前是以 root 用户运行的,必须切换到 ‘discourse’ 用户。导入已开始。