为什么没有“heroku 捆绑包更新”?
我不明白为什么我必须在本地更新我的 gems 并将其推送到 heroku,以获得它们的更新版本?
为什么没有 heroku bundle update
命令?
I don't understand why i have to update my gems localy and push it to heroku, to get the updated version of them?
why there is no heroku bundle update
command?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您
捆绑更新
或运行任何等效的 CLI 命令时,我相信 Bundler 会更新您的 Gemfile.lock 文件 - 它保留所有 gem 依赖项的树 - 并且锁定文件由您的 git 存储库跟踪(请参阅此处了解更多信息)。如果您能够直接在 Heroku 上运行该命令,那么您必须再次拉取存储库,否则您将遇到 git fast-forward 问题。
所以实际上,您不必再运行任何命令,只需在本地执行并将其推回即可。
When you
bundle update
or run any of the equivalent CLI commands, I believe Bundler updates your Gemfile.lock file - which keeps a tree of all your gem dependencies - and the lock file is tracked by your git repository (see here for more info).If you were able to run the command directly on Heroku, then you'd have to pull your repository again, otherwise you'd have a git fast-forward issue on your hands.
So really, you're not running any more commands by having to do it locally and push it back up.
首先应该在本地运行捆绑包更新的真正原因是测试您的应用程序是否仍然可以使用较新的 gem 版本。 heroku bundle update 将是一个危险的命令。
The real reason why should run bundle update localy first is to test if your application is still working with the newer gem version. heroku bundle update would be a dangerous command.