我正在 Windows 机器上构建 Rails 站点,但是当我签入我的 Gemfile.lock 时,我在 Travis 构建中收到以下错误:
Your bundle only supports platforms ["x86-mingw32"] but your local platforms are ["ruby", "x86_64-linux"], and there's no compatible match between those two
列表
这是完整的日志:https ://travis-ci.org/bikebike/BikeBike/builds/222395810#L654
我查看了我的 Gemfile.lock 并指出:
PLATFORMS
x86-mingw32
这似乎是问题的一部分。我尝试将任何特定于 Windows 的宝石放在一个platforms
块中:
platforms 'mswin', 'mingw', 'mswin64', 'x64_mingw' do
gem 'tzinfo-data'
group :test do
gem 'wdm', '>= 0.1.0'
gem 'win32console', require: false
end
end
但是 Gemfile.lock 看起来是一样的。
这是我完整的Gemfile和Gemfile.lock。
我可以通过从 git 中删除 Gemfile.lock 文件来暂时解决这个问题,但这不是最佳实践。无论如何,我可以提交我的 Gemfile.lock 文件并继续在我的 Windows 机器上开发吗?