Mina: Carrierwave: how to share public/uploads path?

Created on 30 Jul 2014  ·  5Comments  ·  Source: mina-deploy/mina

I simply added public/uploads to :shared_paths like this:

set :shared_paths, ['config/database.yml', 'log', 'tmp', 'public/uploads']

Then in task setup: :environment added:

queue! %[mkdir -p "#{deploy_to}/shared/public/uploads"]
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/public/uploads"]

Is this the correct approach?

Most helpful comment

For anyone look at this now, the current method is:

set :shared_dirs, fetch(:shared_dirs, []).push('public/system') (for Paperclip) or
set :shared_dirs, fetch(:shared_dirs, []).push('public/uploads') (for Carrierwave)

I also need to create the directory to symlink to:

mkdir ~/app/shared/public/system or mkdir ~/app/shared/public/uploads

All 5 comments

Excatly :)

works! thank you very much!

Muito obrigado!

Getting error 403 with this in my rails 5 app

For anyone look at this now, the current method is:

set :shared_dirs, fetch(:shared_dirs, []).push('public/system') (for Paperclip) or
set :shared_dirs, fetch(:shared_dirs, []).push('public/uploads') (for Carrierwave)

I also need to create the directory to symlink to:

mkdir ~/app/shared/public/system or mkdir ~/app/shared/public/uploads

Was this page helpful?
0 / 5 - 0 ratings

Related issues

misteral picture misteral  ·  10Comments

Epigene picture Epigene  ·  3Comments

amargherio picture amargherio  ·  10Comments

Epigene picture Epigene  ·  4Comments

Bilge picture Bilge  ·  9Comments