/var/www/discourse# RAILS_ENV=production ruby script/import_scripts/vanilla.rb /shared/export.txt
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:81:in `rescue in new_client’: We could not find your database: discourse. Which can be found in the database configuration file located at config/database.yml.
インポート中のカテゴリ…
script/import_scripts/vanilla.rb:140:in import_categories': private method select’ called for nil:NilClass (NoMethodError)
@root_category = @categories.select { |c| c[:category_id] == "-1" }.first
^^^^^^
from script/import_scripts/vanilla.rb:28:in `execute'
from /var/www/discourse/script/import_scripts/base.rb:47:in `perform'
from script/import_scripts/vanilla.rb:295:in `<main>'
root@vultr-app:/var/www/discourse# cd script/import_scripts
root@vultr-app:/var/www/discourse/script/import_scripts# sudo nano vanilla.rb
root@vultr-app:/var/www/discourse/script/import_scripts# cd ..
root@vultr-app:/var/www/discourse/script# cd ..
root@vultr-app:/var/www/discourse# RAILS_ENV=production ruby script/import_scripts/vanilla.rb public/uploads/vanilla.txt
既存のグループを読み込んでいます…
既存のユーザーを読み込んでいます…
既存のカテゴリを読み込んでいます…
既存の投稿を読み込んでいます…
既存のトピックを読み込んでいます…
ファイルを解析中…
ファイルを読み込み中…
インポート中のトピック…
/var/www/discourse/script/import_scripts/base.rb:544:in create_posts': undefined method count’ for nil:NilClass (NoMethodError)
total = opts[:total] || results.count
^^^^^^
from script/import_scripts/vanilla.rb:184:in `import_topics'
from script/import_scripts/vanilla.rb:30:in `execute'
from /var/www/discourse/script/import_scripts/base.rb:47:in `perform'
from script/import_scripts/vanilla.rb:295:in `<main>'
root@vultr-app:/var/www/discourse# RAILS_ENV=production ruby script/import_scripts/vanilla.rb public/uploads/export.txt
既存のグループを読み込んでいます…
既存のユーザーを読み込んでいます…
既存のカテゴリを読み込んでいます…
既存の投稿を読み込んでいます…
既存のトピックを読み込んでいます…
ファイルを解析中…
ファイルを読み込み中…
script/import_scripts/vanilla.rb:88:in gsub': invalid byte sequence in UTF-8 (ArgumentError) from script/import_scripts/vanilla.rb:88:in read_file’
from script/import_scripts/vanilla.rb:47:in parse_file' from script/import_scripts/vanilla.rb:25:in execute’
from /var/www/discourse/script/import_scripts/base.rb:47:in perform' from script/import_scripts/vanilla.rb:295:in ’
root@vultr-app:/var/www/discourse#