Migrate a XenForo forum to Discourse

コンテナ内の /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’ ユーザーに切り替える必要がありました。インポートが開始されました。

「いいね!」 4