我需要做什么才能将应用程序升级到最新的 Rails 版本?
我目前正在使用 Rails 2.1.0 并想升级到 Rails 2.1.1。 发出以下命令后,
gem update rails
我想我需要更改
RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
environment.rb中的
这一行,我还应该采取哪些其他操作来确保我的应用程序使用最新版本? 还有其他一些文件需要更新吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您还需要进入应用程序目录并运行以下命令:
rakerails:update
然后运行测试并确保一切正常。
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.
据我所知,它定义了您的应用程序作为一个整体将使用哪个版本的 Rails。 我知道对于我现在所在的项目,我必须将其覆盖到 2.1.1 才能在我的虚拟机上工作,因为我已经安装了最新版本,并且没有按照项目要求指定 2.1.0。
您需要注意的最重要的事情是可能会覆盖此设置的插件和扩展,以及可能因版本更改而引起的不兼容性。
2.1.1 还存在一些已知问题,除非有您现在绝对需要的功能,否则您可能需要等待。
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.