A little late to the party, but answers still took me time and foreign reads to understand this problem. So I want to summarize what I have find out about the Gemfile.lock.
When you are building a Rails App, you are using certain versions of gems in your local machine. If you want to avoid errors in the production mode and other branches, you have to use that one Gemfile.lock file everywhere and tell bundler to bundle
for rebuilding gems every time it changes.
If Gemfile.lock
has changed on your production machine and Git doesn't let you git pull
, you should write git reset --hard
to avoid that file change and write git pull
again.