我应该如何升级 Rails 应用程序以使用最新版本的 Rails [英] How should I upgrade a Rails app to use the latest version of Rails

查看:15
本文介绍了我应该如何升级 Rails 应用程序以使用最新版本的 Rails的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个目前使用 Rails 1.2 的 Rails 应用,所以我现在离最新的稳定版本(Rails 2.3)还有很长的路要走.

I'm working on a Rails app that currently uses Rails 1.2, so I'm now quite a long way behind the latest stable release (Rails 2.3).

我应该如何进行迁移到较新版本的 Rails 的过程?

How should I go about the process of moving to a newer version of Rails?

我应该一次升级一个版本还是直接升级到 Rails 2.3?

Should I upgrade one point release at a time or straight to Rails 2.3?

如何找出不同版本的 Rails 之间发生的变化

How do I find out what has changed between versions of Rails, both

  • 让我有更多理由升级的改进或新功能
  • Rails 更改需要我修改我的应用,然后才能使用新版本.

(我见过 这个问题 是关于升级机制的,但我对我应该经历的过程更感兴趣,以使升级尽可能轻松.)

(I have seen this question on the mechanics of upgrading, but I'm more interested in the process I should go through to make the upgrade as painless as possible.)

推荐答案

几个月前我经历了这个,做了很多研究,并整理了一个可能有帮助的 rake 任务(基于其他人的脚本和其他资源)您在代码中标记要更改的内容.这是为了升级到 Rails 2.2,所以它没有考虑到 Rails 2.3 的变化:

I went through this a few months back, did a lot of research and put together a rake task (based on someone else's script plus additional resources) that might help you in flagging things to change in your code. This was for upgrading to Rails 2.2 so it doesn't take into account Rails 2.3 changes:

http://gist.github.com/99535

哦,请务必检查您使用的插件和 gem 是否与 Rails 2.x 兼容并使用最新版本.

Oh, be sure to check that the plugins and gems you use are Rails 2.x compatible and use the latest versions.

而且我绝对同意一次性直接升级到 Rails 2.3.不要一直拖延;你不升级的时间越长,它就越困难,因为更多的变化.由于支持它的资源较少,因此维护 Rails 1.x 代码更加困难.

And I definitely agree with upgrading directly to Rails 2.3 in one go. And don't keep putting it off; the longer you go without upgrading, the more difficult it will be as more will have changed. And it's harder to maintaing Rails 1.x code as there are less resources that support it.

这篇关于我应该如何升级 Rails 应用程序以使用最新版本的 Rails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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