【问题标题】:why does bundler keep "changing" Gemfile.lock with no real change?为什么捆绑器不断“改变” Gemfile.lock 而没有真正的改变?
【发布时间】:2014-10-14 18:24:51
【问题描述】:

每次我运行一些 rake 或 bundler 时都会遇到这个问题,但新旧并没有什么不同,而且它始终是同一个宝石,我什至之前提交了这些更改,但它仍然显示

$ git diff
diff --git a/Gemfile.lock b/Gemfile.lock
index d2dc051..90b25d4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -17,6 +17,13 @@ GIT
     nested_form (0.3.2)

 GIT
+  remote: git://github.com/stefanpenner/country_select.git
+  revision: 79755038ca61dafdfebf4c55346d4a2085f98479
+  specs:
+    country_select (2.1.0)
+      countries (~> 0.9, >= 0.9.3)
+
+GIT
   remote: git://github.com/rubenrails/rails-bootstrap-forms.git
   revision: 88b7ded3cdcca5af3070d6680f5e2b73303b277e
   branch: no_form_group
@@ -34,13 +41,6 @@ GIT
       rails (>= 3.1)
       railties (>= 3.1)

-GIT
-  remote: git://github.com/stefanpenner/country_select.git
-  revision: 79755038ca61dafdfebf4c55346d4a2085f98479
-  specs:
-    country_select (2.1.0)
-      countries (~> 0.9, >= 0.9.3)
-
 GEM
   remote: https://rubygems.org/
   specs:

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-4 bundler


    【解决方案1】:

    我怀疑这与 Bundler 版本有关。如果你检查changelog,你可以阅读:

    “在锁定文件中恢复 gem 源排序”

    所以,如果不同的人使用不同的 Bundler 版本提交到这个 repo,你可能应该使用相同的版本(例如 1.7.2)。

    您可以通过以下方式检查您的 Bundler 版本:

    bundler -v 
    

    【讨论】:

      猜你喜欢
      • 2022-12-06
      • 2011-06-17
      • 2019-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-23
      • 1970-01-01
      相关资源
      最近更新 更多