S3 on Heroku

45 views
Skip to first unread message

bdixon

unread,
Jun 22, 2018, 12:05:31 AM6/22/18
to Refinery CMS
Hello,

I'm struggling to get RefineryCMS 4.0.2 up and running on Heroku using S3 for storage. I followed the tutorial of using the --heroku option on creation (https://www.refinerycms.com/guides/heroku). 

I created a S3 account, added a group and user with the permissions "AmazonS3FullAccess", then added the S3_BUCKET, S3_KEY, S3_SECRET, and S3_REGION of that user to my environment variables on heroku.

The only changes to the code I made were to set asset precompile to false, precompiled the assets, and changed the ruby version in the gemfile to: ruby "2.4.2".

Everything else works, except the images upload to memory, and then dispensary shortly afterwards (i.e. they are clearly not getting through to Amazon S3).

I tried looking at the logs with PaperTrail, and do not see any errors.

Is there a setting that I am missing?

I would humbly appreciate any help. 

Brian

bdixon

unread,
Jun 22, 2018, 5:49:38 PM6/22/18
to Refinery CMS


Also, I wanted to add that I tested the S3 key credentials with cloudberry, and am able to read and write files there.

Anita Graham

unread,
Jun 22, 2018, 11:16:53 PM6/22/18
to Refinery CMS

Have you set logging on in S3?

That often has helpful messages when Refinery/Dragonfly aren't getting through to S3.

Once resolved don't forget to turn logging off again.

bdixon

unread,
Jun 26, 2018, 12:08:33 AM6/26/18
to Refinery CMS
I've turned the S3 logs on, but i don't appear to be getting any errors associated with my uploads.

There are other entries which seem to happen frequently, without any interactions to the website and seem to be more related to the S3 console itself.

"GET /gazelleweb?tagging= HTTP/1.1" 404 NoSuchTagSet 290 - 38
"GET /gazelleweb?encryption= HTTP/1.1" 404 ServerSideEncryptionConfigurationNotFoundError 353 

The other thing I noticed is there is no initializer for dragonfly under "\config\initializers\refinerycms" which is refered to in "\config\initializers\refinerycms\images.rb" file. Is this something that is missing from the initial generator (i,e, console# refinerycms app --heroku ) ?
I've tried adding it to no avail, but if it is an issue, could there be other files i may be missing too?

The last time I configured one of these was 2012 when refinerycms was using paperclip... apologies as I'm a little rusty.

Anita Graham

unread,
Jun 27, 2018, 10:19:29 AM6/27/18
to Refinery CMS

Hmm, you may be right. 

The generator associated with refinerycms-dragonfly should create an initializer, and there is a test to see that the initializer is created.

I'll raise the issue on gitter and see what we can do.

Anita Graham
Reply all
Reply to author
Forward
0 new messages