【问题标题】:Heroku Bundler specific_platform trueHeroku Bundler specific_platform true
【发布时间】:2017-06-26 08:59:28
【问题描述】:

我正在 Windows 上开发并使用 image_optim 和 image_optim_pack gems。以前,将这些推送到 Heroku 不是问题,一切都正常解决。现在我收到一个新的警告并且生产失败:

Unable to use the platform-specific (x86_64-linux) version of image_optim_pack (0.5.0.20170609) because it has different dependencies from the ruby version. 
To use the platform-specific version of the gem, run `bundle config specific_platform true` and install again.
remote: Could not find image_optim_pack-0.5.0.20170609 in any of the sources

我试图在 heroku 上设置一个 env var 以允许这样做,但似乎 Heroku 只允许为捆绑安装设置 vars(例如 --without),他们的文章在这里对我没有帮助:

https://devcenter.heroku.com/articles/bundler-configuration

问题:如何在 Heroku 上将 platform_specific 设置为 true?

【问题讨论】:

    标签: heroku environment-variables bundle


    【解决方案1】:

    问题解决了。添加变量的正确方法是这样写:

    In the KEY field:
    BUNDLE_SPECIFIC_PLATFORM
    In the VALUE field:
    true
    

    在为 bundler 设置本地配置并检查我机器上的文本文件后,我注意到了这一点。

    【讨论】:

      猜你喜欢
      • 2012-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-24
      • 1970-01-01
      • 1970-01-01
      • 2015-09-23
      • 2021-04-05
      相关资源
      最近更新 更多