Great stuff Chris! Very exciting. I also just watched the @mention episode too.
To anyone reading this, a few questions:
What a great addition to Rails. Thanks for documenting it Chris!
In case this helps anyone (I had a hell of time troubleshooting this):
I ran into a really frustrating issue when I pushed to Heroku. Rich text (trix) with image uploading was all working fine locally, but on Heroku dropped-in images weren't saving, and the issue had to do with my using Amazon S3.
Turns out it was a CORS issue, which Chris made a video about here:
In addition to that, I had to set my CORS configuration in my S3 bucket settings. This was the configuration that ended working for me:
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedMethod>PUT</AllowedMethod> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration>
I have been following the tutorial closely, however, I was not able to resolve the issue which you resolved purely by uncommenting
gem 'image_processing', '~> 1.2'. Picture in my post would still remain broken.
I am running Rails 5.2.2, Ruby 2.6.0, and I am also using
mini_magick gem after following your other tutorial on user avatars. Any chance that this can cause the problem?
Join 20,000+ developers who get early access to new screencasts, articles, guides, updates, and more.