我试图在Gemfile.lock
没有明确这样做的情况下追踪几个平台是如何添加到我的。在添加新宝石时,我一定忽略了这些更改,但是在添加这些相同的更改时,我无法重现相同的Gemfile.lock
平台添加Gemfile
。
这是添加新平台的提交。
#....
+gem 'sqreen'
+gem 'sanitize'
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
@@ -55,6 +57,8 @@ gem 'postmark-rails'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
+ gem 'capybara'
+ gem 'selenium-webdriver'
end
Gemfile.lock
以及对同一提交中的更改:
PLATFORMS
+ java
ruby
+ x64-mingw32
+ x86-mingw32
+ x86-mswin32
我试图在测试应用程序中重现相同的修改,但这些平台没有添加到Gemfile.lock
我最近推送到heroku时注意到了这一点:
Removing `Gemfile.lock` because it was generated on Windows.
remote: Bundler will do a full resolve so native gems are handled properly.
remote: This may result in unexpected gem versions being used in your app.
remote: In rare occasions Bundler may not be able to resolve your dependencies at all.
remote: https://devcenter.heroku.com/articles/bundler-windows-gemfile
我不是在 Windows 机器上开发,现在正在添加特定于平台的 gem Gemfile.lock
,例如:
ffi (1.9.18)
ffi (1.9.18-java)
ffi (1.9.18-x64-mingw32)
ffi (1.9.18-x86-mingw32)
我不完全确定这些平台是如何添加的。不建议直接修改锁定文件,但为了安抚 heroku 警告,我是否应该探索删除所有平台特定引用并删除锁定文件中的非 ruby 平台?欢迎在这里提出任何建议。
rails 5.1.3