简体   繁体   English

将应用程序升级到最新的Rails版本需要做什么?

[英]What do I need to do to upgrade an application to the latest Rails version?

I am currently using Rails 2.1.0 and want to upgrade to Rails 2.1.1. 我目前正在使用Rails 2.1.0并希望升级到Rails 2.1.1。 After issuing the following command 发出以下命令后

gem update rails

I suppose that I need to change this line 我想我需要改变这一行

RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION

in environment.rb 在environment.rb中

What other actions should I take to ensure that my application is using the latest version? 我应该采取哪些其他措施来确保我的应用程序使用最新版本? Are there some other files that need an update? 是否有其他文件需要更新?

You'll also need to go into your application directory and run the following command: 您还需要进入应用程序目录并运行以下命令:

rake rails:update rake rails:更新

Then run your tests and make sure everything works. 然后运行测试并确保一切正常。

As far as I know, that right there defines what version of rails your application as a whole will use. 据我所知,那就是定义你的应用程序整体将使用哪种版本的rails。 I know for a project I'm in right now I had to override that to 2.1.1 to work on my VM because I had installed the latest, and had not specified the 2.1.0 as required by the project. 我知道我现在所处的项目我必须将其覆盖到2.1.1才能在我的VM上工作,因为我安装了最新版本,并且未按项目要求指定2.1.0。

The biggest thing you have to watch out for is plugins and extensions that may override this setting, as well as incompatibility that will likely arise from changing versions. 您必须注意的最重要的事情是可能会覆盖此设置的插件和扩展,以及更改版本可能导致的不兼容性。

Also there are some known issues with 2.1.1, unless there is a feature you absolutely need now, you may want to wait. 2.1.1中也存在一些已知问题,除非你现在绝对需要一个功能,否则你可能要等待。

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

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