Bathinda
(Bathinda Helper)
2019 年 12 月 20 日午後 1:16
24
Can you pls elaborate what you did here (you showed double inverted commas here).
And what’s the relevance of this edit? I mean, how did you know that this was the culprit or how did it solve this?
I’m facing with this error while migrating my images/assets from local to S3: “S3 migration failed for db ‘default’” (my branding logos don’t show anywhere).
「いいね!」 1
eextra
(Sylwia)
2020 年 3 月 24 日午前 6:04
26
> FileStore::ToS3MigrationError: 新しいスキームへのアップロードの移行に失敗しました。手動で修正する必要があります。
> /var/www/discourse/lib/file_store/to_s3_migration.rb:151:in `migrate_to_s3'
> /var/www/discourse/lib/file_store/to_s3_migration.rb:61:in `migrate'
> /var/www/discourse/lib/tasks/uploads.rake:239:in `migrate_to_s3'
> /var/www/discourse/lib/tasks/uploads.rake:218:in `block in migrate_to_s3_all_sites'
> /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rails_multisite-2.1.1/lib/rails_multisite/connection_management.rb:64:in `with_connection'
> /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rails_multisite-2.1.1/lib/rails_multisite/connection_management.rb:74:in `each_connection'
> /var/www/discourse/lib/tasks/uploads.rake:216:in `migrate_to_s3_all_sites'
> /var/www/discourse/lib/tasks/uploads.rake:212:in `block in <top (required)>'
一般的に、これらのファイルがあります。
original フォルダを除くすべてのファイル(多分)に画像がありません。なぜでしょうか?もしかして、手動でコピー(Ctrl+C)する方が簡単でしょうか?
assets フォルダ:
「いいね!」 1
eextra
(Sylwia)
2020 年 3 月 24 日午前 6:24
27
変更を試みましたが、lib/tasks/uploads.rake にはもうそのコードがありません。何が問題なのでしょうか?
「いいね!」 1
Bathinda
(Bathinda Helper)
2021 年 4 月 16 日午後 12:57
28
この行をどこに記述すればよいか、また等号の後の二重引用符内は空白のままにするのか、それとも自分の S3 CDN URL を入力すべきなのか、詳しく教えてください。ご教示のほどよろしくお願いいたします。
「いいね!」 1
eextra:
uploads.rake
export 命令がコマンドラインで実行されました。
export DISCOURSE_S3_CDN_URL=""
これにより Linux がそれをシステム変数として認識します。CDN を使用していなくても、空の引用符でその変数を設定する必要がありました。
「いいね!」 2
Bathinda
(Bathinda Helper)
2021 年 5 月 7 日午後 12:26
30
上記の行は、ファイル lib/tasks/upload.rake にはもう存在しません。
私はその(上記の)ファイルを非常に注意深く検索しました。
返信ありがとうございます。しかし、どのコマンドラインのことでしょうか?このコマンドは web_only コンテナ内で実行する必要があるのでしょうか?
「いいね!」 1
それから更新されているかもしれませんが、それは2年前の話です。
Bathinda:
どのコマンドラインの話ですか?
あなたのLinuxサーバーのことです。コンテナに「入って」(sudo ./launcher enter app)、環境変数をエクスポートして、システムがその値を認識できるようにしました。参考になれば幸いです。
「いいね!」 3