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

amargherio picture amargherio  路  10Comments

misteral picture misteral  路  10Comments

ghost picture ghost  路  12Comments

ozgg picture ozgg  路  6Comments

davidhq picture davidhq  路  10Comments