The error message you’re getting regarding Gemfile.lock
may be because your Gemfile
and Gemfile.lock
don’t agree with each other. It sounds like you’ve changed something in your Gemfile since you last ran bundle install
(or update
). When you bundle install
, it updates your Gemfile.lock with any changes you’ve made to Gemfile.
Make sure you run bundle install
locally, and check-in to source control your newly updated Gemfile.lock
after that. Then try deploying.
Edit: As recognised in the comments, a conditional in the Gemfile resulted in a valid Gemfile.lock on one platform, invalid on another. Providing a :platform flag for these platform-dependent gems in the Gemfile should solve the asymmetry.