Error when doing "bundle exec rake s3:upload_assets" - Could not locate Gemfile or .bundle/ directory

You do need environment vars, that’s why it’s documented that way at Configure an S3 compatible object storage provider for uploads and why the error message tells you to do that.

All of the S3 variables should be moved to hidden settings, as mostly no good can come from configuring them in the settings.

Sorry, and I forgot that you’re not using Docker. But yes, you still need to set them in the ENV variables. I do that in my development environment to restore databases from S3.

If you’re not doing this for a development environment, you’re very likely making a big mistakes.