升级宝石会破坏旧的Rails应用程序吗? [英] Will upgrading gems break old Rails applications?

查看:106
本文介绍了升级宝石会破坏旧的Rails应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多在Rails 1.x上运行的Rails应用程序。我需要升级宝石,所以问题是,这些旧的应用程序在我升级宝石后仍然可以工作吗?

I have bunch of Rails apps running on Rails 1.x. I need to upgrade the gems so the question is, will these old apps still work after I upgrade gems?

谢谢。

推荐答案

当然,唯一确定的方法就是测试。这就是说,如果你想确保应用程序在你测试的时候工作,我相信你可以运行

The only way to be sure is to test, of course; that said, if you want to be sure the application works while you test, I believe that you can run

rake rails:freeze:gems

将当前安装的gem复制到项目中的vendor文件夹。如果在测试之后,您的项目可以使用较新的版本,请运行

to copy the currently installed gems to the vendor folder inside your project. If, after testing, your project can use newer versions, run

rake rails:unfreeze

返回系统安装版本的宝石。

to return to the system installed versions of the gems.

这篇关于升级宝石会破坏旧的Rails应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆