简体   繁体   English

将Rails升级到最新版本

[英]Upgrade Rails to latest version

I'm new to the Ruby on Rails environment and would like to get input in relation to upgrading my Rails environment from 4.0.2 to 4.2.3, which I assume is the latest version. 我是Ruby on Rails环境的新手,并且想获得有关将Rails环境从4.0.2升级到4.2.3的信息,我认为这是最新版本。

My Ruby version is 2.0.0p353 (2013-11-22) [i386-mingw32] . 我的Ruby版本是2.0.0p353 (2013-11-22) [i386-mingw32]

  • Is upgrading a straight-forward process? 升级是否简单明了? If not, what is the upgrade path I need to follow? 如果没有,我需要遵循的升级路径是什么?
  • I normally use bundle install cmd to install all gems. 我通常使用bundle install cmd安装所有gem。 Is there a similar command to upgrade to the latest version? 是否有类似的命令可以升级到最新版本?
  • Do I need to backup my apps before I try anything? 在尝试任何操作之前,是否需要备份我的应用程序?

In your gemfile change: 在您的gemfile中更改:

gem 'rails', '4.0.2'

to

gem 'rails', '4.2.3'

and in your terminal run bundle update . 并在终端中运行bundle update

If you are trying to update ONLY Rails, run: bundle update rails . 如果您尝试更新Rails,请运行: bundle update rails

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

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