新手问题 为什么我的 Gemfile.lock 文件总是变?

uestc_bird · 2016年08月17日 · 最后由 uestc_bird 回复于 2016年08月18日 · 2227 次阅读

什么都没做,没执行 bundle install,这个文件总是变,checkout -f 没几分钟又会变化

On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   Gemfile.lock

no changes added to commit (use "git add" and/or "git commit -a")

是不是有一些比如文件末尾自动添加了换行符或者编辑器自动去除行尾空白?可能是跟编辑器的配置有关。

git diff 看一下这个文件就知道哪里改了,再具体找原因

是不是用了 rubymine?

遇到过类似的情况,应该是 bundler 的版本不一致的问题~

#4 楼 @robertyu 恩,是的,确实是 bundler 版本不一致导致的,已经解决了

需要 登录 后方可回复, 如果你还没有账号请 注册新账号