ruby-on-rails – Paperclip在AWS Elastic Beanstalk上找不到Ima
发布时间:2020-12-17 03:24:04 所属栏目:百科 来源:网络整理
导读:我正在运行rails 4.1和paperclip 4.2,在我部署到AWS Elastic Beanstalk之后我无法使用paperclip将文件保存到S3,我收到一个错误: Command :: file -b --mime '/tmp/308f17f99f5a4157c8839634d039b1c620141002-22818-7crhx4.jpg'Command :: identify -format
我正在运行rails 4.1和paperclip 4.2,在我部署到AWS Elastic Beanstalk之后我无法使用paperclip将文件保存到S3,我收到一个错误:
Command :: file -b --mime '/tmp/308f17f99f5a4157c8839634d039b1c620141002-22818-7crhx4.jpg' Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/308f17f99f5a4157c8839634d039b1c620141002-22818-xo8669.jpg[0]' 2>/dev/null [paperclip] An error was received while processing: #<Paperclip::Errors::CommandNotFoundError: Could not run the `identify` command. Please install ImageMagick.> 有任何想法吗?如何将ImageMagick安装到ELB? 解决方法
事实证明,您可以通过SSH连接到EC2实例并手动安装ImageMagick,但需要注意的是,如果实例本身有更新,手动更改将不会持续存在.执行此操作的最佳方法是创建.ebextensions文件夹并添加配置文件.看起来像这样的东西:
packages: yum: ImageMagick-devel: [] 此外,您的.ebextensions不应该在您的gitignore中. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 如何在Swift中使用访问者模式减少样板?
- React 快速上手 - 08 redux 状态管理 react-redux
- ruby – 如何检查一个变量是否真的response_to:dup?
- C#项目文件腹泻是常态吗?
- ruby-on-rails – 由于我的用户表中的重复列–Rails 3.1,De
- cocos2d-x定时器
- 使用ruby gmail api v0.9发送电子邮件
- 基于react + redux + ES6 + webpack + react-router的英雄联
- JSON.parse()和JSON.stringify()
- PostgreSQL中字段中的Django ProgrammingError