开发者

saving photos with paperclip

开发者 https://www.devze.com 2023-02-15 01:02 出处:网络
I have installed paperclip on my r开发者_开发技巧ails app (deployed on heroku). On my localhost it worked fine, but on heroku it didnt work.

I have installed paperclip on my r开发者_开发技巧ails app (deployed on heroku). On my localhost it worked fine, but on heroku it didnt work.

I looked at the log and found that this is the problem:

Errno::EACCES(Permission denied - /app/723a45cd/home/public/system):

It looks like it dont have permissions for "system" folder (its the pictures folder).

How I solve this? Should I give the app permissions? If yes, how?

Thanks,

Oded


I don't think you can store uploaded files on Heroku, you'll have to use S3 as described in their documentation.


Heroku has a read-only file system (except the /tmp directory) which means you'll need to save your images elsewhere. Probably the best place is Amazon S3, which Paperclip happens to support natively.

0

精彩评论

暂无评论...
验证码 换一张
取 消