简体   繁体   English

可以为rails应用程序“捆绑安装”更新gems吗?

[英]May “bundle install” update gems for rails application?

My bundle file contains gem descriptions like: 我的包文件包含宝石描述,如:

gem 'turbolinks', '~> 5'
gem 'kaminari'

During the lapse of one year, these gems were updated, losing backward compatibility. 在一年的时间里,这些宝石被更新,失去了向后兼容性。 After that, if I run bundle install in a new machine that has no gems, I fear it will install all gems with the latest versions, and my code will break due to this. 之后,如果我在没有宝石的新机器上运行bundle install ,我担心它将安装所有具有最新版本的gem,并且我的代码将因此而中断。

Am I right? 我对吗? what is the solution to avoid this issue? 避免这个问题的解决方案是什么?

I fear it will install all gems in latest versions and my code will break due to this. 我担心它会在最新版本中安装所有宝石,我的代码会因此而中断。

If you've Gemfile.lock along with Gemfile bundle install doesn't break your code. 如果您使用Gemfile.lockGemfile bundle install不会破坏您的代码。 The Gemfile.lock file is where Bundler records the exact versions that were installed (or must be installed). Gemfile.lock文件是Bundler记录已安装(或必须安装)的确切版本的位置。 Otherwise you might have problems with versions dismiss. 否则,您可能会遇到版本解除问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM