简体   繁体   English

Asset_sync gem跳过PDF文件

[英]Asset_sync gem skipping PDF files

I recently configured the asset_sync gem to sync all of my assets to Amazon S3. 我最近配置了asset_sync gem,以将我的所有资产同步到Amazon S3。 I deploy on Heroku, and for whatever reason, it seems to be skipping all PDF files in my /app/assets directory. 我部署在Heroku上,由于某种原因,它似乎跳过了/app/assets目录中的所有PDF文件。 I haven't told it to exclude any files, why might this happen? 我没有告诉它要排除任何文件,为什么会发生这种情况?

I've followed this guide: https://devcenter.heroku.com/articles/cdn-asset-host-rails31 , and as such I don't have an asset_sync.rb initializer file. 我遵循了该指南: https : asset_sync.rb ,因此我没有asset_sync.rb初始化程序文件。

I've tried moving the PDFs to their own dir, /app/assets/pdfs , and no dice there either. 我试过将PDF移到他们自己的目录/app/assets/pdfs ,也没有骰子。

Strangely, I have a .zip file in the /app/assets/images dir, so it seems like specifically PDFs are being skipped. 奇怪的是,我在/app/assets/images目录中有一个.zip文件,因此似乎专门跳过了PDF。

Rails 3.2.13, Ruby 2.0, Heroku Cedar Stack, current release of asset_sync gem Rails 3.2.13,Ruby 2.0,Heroku Cedar Stack, asset_sync gem的当前版本

Turns out I had added *.pdf to my .slugignore file, and Heroku was tossing out the PDF files on deploy. 原来,我已经在我的.slugignore文件中添加了*.pdf ,Heroku在部署时扔出了PDF文件。 DERP! DERP!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM