Migrating uploads to S3 for 'default'... rake aborted!

NameError: uninitialized constant FileStore::ToS3Migration::Aws

I set the bucket according to the manual. Then I typed in the console but I can’t move the images. Why this bug ?
i put (app:/var/www/discourse# : )

DISCOURSE_S3_BUCKET=new-bucket \
DISCOURSE_S3_REGION=EU_Frankfurt \
DISCOURSE_S3_ACCESS_KEY_ID=dsadadassdadaIdsadY4 \
DISCOURSE_S3_SECRET_ACCESS_KEY=xyss1dsMtdsakcmjxBVsg1xsadaX \
rake uploads:migrate_to_s3
1 Like

whether it’s a bug or maybe I misspelled something ?

Try eu-central-1 — see https://docs.aws.amazon.com/general/latest/gr/rande.html for a list of regions.

3 Likes

Unfortunately, it’s still a problem.

 >    Migrating uploads to S3 for 'default'...
>     rake aborted!
>     NameError: uninitialized constant FileStore::ToS3Migration::Aws
>     /var/www/discourse/lib/file_store/to_s3_migration.rb:159: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)>'
>     /usr/local/bin/bundle:23:in `load'
>     /usr/local/bin/bundle:23:in `<main>'
>     Tasks: TOP => uploads:migrate_to_s3
>     (See full trace by running task with --trace)

reading other threads and trying to get to the problem I noticed that I have only such settings in the file. There shouldn’t be any data for S3 ?

my discourse.conf:

> hostname = 'dasda' 
> smtp_user_name = 'dadsafa' 
> smtp_address = 'fasfaf' 
> db_socket = '/var/run/postgresql' 
> developer_emails = 'dasda@zyz.com' 
> smtp_port = '587' 
> smtp_password = 'zxc' 
> db_host = '' 
> db_port = '' 
> force_https = 'true'

I set the app.yml data to s3 so that now GlobalSetting.use_s3? returns true

but I still can’t move the files to s3.