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

孤人 提交于 2019-12-01 02:18:10

问题


I am currently using Rails 2.1.0 and want to upgrade to 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

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?


回答1:


You'll also need to go into your application directory and run the following command:

rake rails:update

Then run your tests and make sure everything works.




回答2:


As far as I know, that right there defines what version of rails your application as a whole will use. 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.

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.



来源:https://stackoverflow.com/questions/184550/what-do-i-need-to-do-to-upgrade-an-application-to-the-latest-rails-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!