Barry Hess Test

Follow @bjhess on Micro.blog.

I’m standing up a prototype app using Rails and Render. It wasn’t too hard to figure out how to get things going - Render’s docs have been pretty good! But I figured it is worth jotting down a few pointers about what I had to do right now while using a Render native environment and Rails 7.0.1.

  • The Rails guide on Active Storage is generally great.
  • You will be using Render Disks for storage, which means you can no longer stay on the free plan.
  • Of the available image processing options, Render’s native environments only include imagemagick out of the box, so you will have to use MiniMagick for your processor.
    • This means brew install imagemagick
    • Rails is transitioning to preferring Vips. While it is not documented yet, you will need config.active_storage.variant_processor = :mini_magick in application.rb to get things working.
  • When setting up your Disk, note your mount path. I used /storage.
  • Your storage.yml for production should look something like this:

    production_local:
    service: Disk
    root: '/storage'
    
  • config/environments/production.rb needs:

    config.active_storage.service = :production_local
    

Testing code fences again:

production_local:
  service: Disk
  root: '/storage'

And paste from a working post:

production_local:
  service: Disk
  root: '/Storage'

And

production_local:
  service: Disk
  root: `/Storage`