nerdgeschoss / shimmer

Shimmer is a collection of Rails extensions that bring advanced UI features into your app and make your life easier as a developer.
https://nerdgeschoss.de
MIT License
6 stars 1 forks source link

AWS configs in Rake `pull_asset` #1

Closed Adeynack closed 2 years ago

Adeynack commented 2 years ago

https://github.com/nerdgeschoss/shimmer/blob/a5b75d6d307e8b04e97a4d056f32d40728480ed9/lib/shimmer/tasks/db.rake#L21-L26

On Heroku, those config are all prefixed with S3_. How can this Rake task work? Also, executing heroku config --json without the -a APP_NAME switch does not work. Is this made to run only from another Heroku app, or also locally?

Adeynack commented 2 years ago

I copied the Rake task locally and I was able to make it work giving a default to .fetch("AWS_REGION") and putting it in ENV["AWS_REGION"] instead of "AWS_DEFAULT_REGION".

Adeynack commented 2 years ago

Download worked, but then...

NameError: uninitialized constant ActiveStorage::VariantRecord
Adeynack commented 2 years ago

And service_name is no column in ActiveStorage::Blob. Did those last 2 things appear in more recent versions of Rails?

JensRavens commented 2 years ago
Adeynack commented 2 years ago

So basically, I was trying that out on an outdates project?

JensRavens commented 2 years ago

now sure which project that was, but I'd say yes.