Migrate a XenForo forum to Discourse

Ok so I managed to move onto the next step. Someone above posted that we need to be in /var/www/discourse folder on the container and then add the gem.

Now on the final step

RAILS_ENV=production bundle exec ruby script/import_scripts/xenforo.rb

I am getting this error. What could I be doing wrong?

/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.

Solved it: I was running as root user, had to switch to the ‘discourse’ user. Import has started.

4 Likes