一些关于低于rails 2.0的升级
gem update --system #gem升级本身
gem update rails --include-dependencies #rails升级
gem update activesupport#
Upgrading to Rails 2.0. A Recipe
1. 检查所有放弃使用的方法
最好的检查办法是下载[ur=http://topfunky.net/svn/plugins/deprecated/tasks/deprecated.rakel]rake task[/url]并放到lib/tasks目录,然后运行
rake deprecated
这个Rake任务,就会帮助你找到所有的弃用的方法。
2. 清理你的environment
这个文件初始化的时候,如果做了很多操作,往往会导致升级时候的错误。
mkdir config/initializers
重新生成初始化和配置文件是个不错的选择。
3. 更新 engine
引用
Even though a lot of the Rails engine is provided by the Rails gems, there is some boiler plate code that each app needs. This is created when you run the rails /path/to/app command. Well, to ensure that everything is up to date, we will do the same thing again. The rails command is smart enough to compare files for differences before overwriting them.
rails /path/to/your/app
You should now be asked “overwrite [file]? (enter “h” for help) [Ynaqdh]” for a whole bunch of files. Double check each filename before hitting yes - some of the files you WON’T want to overwrite (Examples are 404.html, 500.html, database.yml etc). If it is a configuration file you probably won’t want to overwrite it. It will also update the rubyScript libraries, so if you are reliant on those, you may want to say no there too.
I’ve found this is the best way to make sure everything is up to date.
4. 更新视图
参考这里
更新视图
虽然,不是严格要求,但是最好还是把.rhtml换成html.erb对一致性比较好
还有一些插件还需要处理
分享到:
相关推荐
Embrace the full stack of web development, from styling with Bootstrap, building an interactive user interface with Angular 2, to storing data quickly and reliably in PostgreSQL. With this fully ...
rails.vim提供了常用的一些命令,可以帮助开发,例如:Rgenerate, Rake, Rfind,RTview等,很方便,也很实用。...拷贝 autoload/rails.vim, plugin/rails.vim, 和 doc/rails.txt 到 ~/.vim 目录. 标签:rails
Ruby on Rails Bible.pdf Ruby on Rails Bible.pdf
Rails.Recipes.Rails.3.Edition.和源码
[Ruby_on_Rails][中文][Rails_5.x]__03-2_._安裝不同版本的Rails與產生Rails_5.x版
使用RSpec 测试Rails 程序.pdf
This book is intended for intermediate to advanced Rails programmers. It assumes that you already know Ruby, and have either read one of the many wonderful introductory books on Rails or have ...
RailsSpace teaches you Ruby on Rails by developing a real-world application: RailsSpace, a social networking website aimed at the Rails community itself. We take you step by step, from the virtually...
Addison.Wesley.Rails.AntiPatterns.Best.Practice.Ruby.on.Rails.Refactoring
Ruby.on.Rails.Enterprise.Application.Development
Netbeans 6.0 JRuby on Rails 演示 .swf
Ruby.on.Rails.Tutorial,Learn.Web.Development.with.Rails,Third.Edition-中文版 文字版.pdf 个人收集电子书,仅用学习使用,不可用于商业用途,如有版权问题,请联系删除!
Ruby on Rails Guides_ A Guide to Testing Rails Applications.pdf
RESTful.Rails.Development.2015.10.pdf
Pragmatic.Security.on.Rails.Dec.2009.rar
Ruby_on_Rails实践.rar
This concise teaches you how to use the power of Docker and Kubernetes to deploy your Rails applications easily and efficiently. Docker and Kubernetes are increasing in popularity every day, but what ...
Apress,.Beginning.Google.Maps.Applications.with.Rails.and.Ajax.
twitter-bootstrap-rails, 用于 Rails 5 4.x 资产管道的Twitter Bootstrap 用于 Rails 5和 Rails 4资产管道的 Twitter BootstrapBootstrap 是 Twitter的工具包,旨在开发网络应用程序和站点的kickstart 。...
This short early adopter book details both how you'll upgrade existing web and...Chapter 2: Changes from Rails 4.2 Chapter 3: Active Record Chapter 4: Testing Chapter 5: Rails API Chapter 6: Action Cable