I am using Shrine gem in our application which needs to initialize with default storage path.
As I understand, Disk is not available during deploy process on Render. And so I tried to avoid it by wrapping code with
if defined?(Rails::Server) which should ensure, that the code is run only when server is up. Unfortunately this always returns
false on Render.
Is there any way to initialize Shrine only when the server is up?
UPDATE: I have actually just been successful by putting the init code to puma.rb, which is kinda weird, but at least it works.