首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >heroku部署失败,出现fog-aws (显示formatador“已删除”)

heroku部署失败,出现fog-aws (显示formatador“已删除”)
EN

Stack Overflow用户
提问于 2019-01-02 04:13:16
回答 1查看 91关注 0票数 0

我有一个网站上传图像到AWS使用fog-aws。当我在本地运行它时,一切工作正常,但它不会部署到heroku。标准heroku/ruby构建包,所有内容的最新版本:

ruby 2.5.1,rails 5.2.2,gem 'carrierwave','1.3.1‘gem 'fog-aws','3.3.0’

尝试: 1)当然,多次删除安装的Gemfile.lock文件和包2)显式包含了formatador,使用旧版本(我不认为错误消息是正确的,因为formatador 0.2.5确实存在,我可以在本地和heroku上安装它) 3)使用'fog‘而不是'fog-aws’(给我类似的错误与'unf',并包含大量不必要的依赖项)

代码语言:javascript
复制
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.5.1
remote: -----> Installing dependencies using bundler 1.15.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote:        Fetching gem metadata from https://rubygems.org/........
remote:        Fetching version metadata from https://rubygems.org/..
remote:        Fetching dependency metadata from https://rubygems.org/.
remote:        Your bundle is locked to formatador (0.2.5), but that version could not be found
remote:        in any of the sources listed in your Gemfile. If you haven't changed sources,
remote:        that means the author of formatador (0.2.5) has removed it. You'll need to
remote:        update your bundle to a different version of formatador (0.2.5) that hasn't been
remote:        removed in order to install.
remote:        Bundler Output: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote:        Fetching gem metadata from https://rubygems.org/........
remote:        Fetching version metadata from https://rubygems.org/..
remote:        Fetching dependency metadata from https://rubygems.org/.
remote:        Your bundle is locked to formatador (0.2.5), but that version could not be found
remote:        in any of the sources listed in your Gemfile. If you haven't changed sources,
remote:        that means the author of formatador (0.2.5) has removed it. You'll need to
remote:        update your bundle to a different version of formatador (0.2.5) that hasn't been
remote:        removed in order to install.
EN

回答 1

Stack Overflow用户

发布于 2019-01-02 09:35:59

弄清楚了;只需要RTFM!

我需要在config/initializers/fog.rb的顶部添加"require 'fog/aws'“。在没有它的情况下在本地工作,但在部署到heroku时导致了上面的行为。我添加了这一行,它起作用了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53998608

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档