【问题标题】:Platform of gem tzinfo-data for both 32bit and 64bit Ruby on windows用于 Windows 上 32 位和 64 位 Ruby 的 gem tzinfo-data 平台
【发布时间】:2016-01-29 23:06:54
【问题描述】:

我们的开发计算机安装了 32 位和 64 位 rubytzinfo-data 需要指定破坏 Rails 4.2 应用程序的平台。

对于 64 位 ruby​​,Gemfile 具有:

gem 'tzinfo-data', platforms: [:x64_mingw, :mingw, :mswin]

对于 32 位 ruby​​,`Gemfile' 有:

gem 'tzinfo-data', platforms: [:mingw_20, :mingw, :mswin]

如果在 64 位平台上运行 32 位 ruby​​ 或虎钳,应用程序会崩溃。

如何指定对 32 位和 64 位 ruby​​ 都适用的平台?

【问题讨论】:

    标签: ruby-on-rails tzinfo


    【解决方案1】:

    这应该适用于 32 位和 64 位 Ruby:

    gem 'tzinfo-data', platforms: [:x64_mingw, :mingw, :mswin]
    

    您也可以完全删除 platforms 选项:

    gem 'tzinfo-data'
    

    确保您已使用 32 位和 64 位 Ruby 版本运行 bundle update 命令,以将 tzinfo-data gem 安装到该 Ruby 安装中。

    有关platforms 选项的作用的更多信息,请参阅Gemfile manual page

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-30
      • 2014-03-10
      • 2016-02-22
      • 2011-09-02
      • 2017-09-24
      • 1970-01-01
      • 2011-12-21
      相关资源
      最近更新 更多