4

every time I run bundle --without=production bundler adds platform information PLATFORMS x86-mingw32 to Gemfile.lock and I have to remove that info manually as I am deploying to Heroku. If I do not remove it, Gemfile.lock is not added to repository and causes errors.

how can I prevent bundler from adding platform info to Gemfile.lock

Hesham
  • 525
  • 1
  • 5
  • 11

1 Answers1

1

I had a very similar question - Can I stop Bundler from adding RUBY VERSION to Gemfile.lock - and it turns out the answer is that it can't be done. Bundler adds this information within the to_lock method and there's no conditional to skip that section.

It seems like it would be possible to refactor to_lock to control which sections of the lockfile are actually written, but so far this hasn't been enough of a pain point for me to make that effort yet.

Community
  • 1
  • 1
pjmorse
  • 9,204
  • 9
  • 54
  • 124