Question
Dokku Rails app unable to interact with Block Storage [Errno::EACCES (Permission denied)]
I have a rails app where users are able to upload an avatar image via Ruby’s Paperclip gem.
In terms of paperclip’s configurations, I have the following set:
For my model:
hasattachedfile :avatar, path: “/mnt/volume-sgp1-01/:class/:attachment/:id/:style/:filename”
For paperclip environment configurations:
config.paperclip_defaults = { url: ’/mnt/volume-sgp1-01/:class/:attachment/:id/:style/:filename’ }
Hypothetically, this should work. However, when the upload starts, I get the following error message.
Errno::EACCES (Permission denied @ dirsmkdir - /mnt/volume-sgp1-01)
Also, once permission is granted, how can I make sure that it is automatically linked to a corresponding url direction in my rails app? (ex: xyz.com/mnt/volume-sgp1-01/…)
Thanks!
I have read the Digital Ocean documentation on block storage, but I feel the documentation is missing a lot of important details on actually integrating it with a Ruby on Rails application.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×