Should Gemfile.lock be committed to source control on Windows?

前端 未结 1 921
梦毁少年i
梦毁少年i 2021-01-11 10:26

Ruby newb here.

I download ruby via rubyinstaller, did gem install rails, resolved a few missing libraries, and finally forked the ruby project I want t

1条回答
  •  -上瘾入骨i
    2021-01-11 11:00

    Last time I pushed to Heroku with a Windows Gemfile.lock it handled it pretty gracefully. I don't remember if it failed and rebuilt the Gemfile.lock or just stripped the binary gem tags.

    There are 2 viable options I see.
    One is to assume that there isn't going to be a problem with this behavior. Which means using strict gem version requirements or updating your bundle and confirming everything works before you push.

    Another is to use the :platform flag in your Gemfile. I won't recommend this, but it should force the source down and compile the gem locally. Which means any external dependencies need to be available. With a lot of binary gems (like the pg gem) this isn't an easy task. With some other gems it can be nearly impossible. Once again, I would not recommend doing this.

    0 讨论(0)
提交回复
热议问题