从 Rails 3 升级到 Rails 3.1

编程入门 行业动态 更新时间:2024-10-28 18:23:22
本文介绍了从 Rails 3 升级到 Rails 3.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何从 Rails 3 升级到 Rails 3.1 测试版?

How do you upgrade from Rails 3 to Rails 3.1 beta?

推荐答案

这是更新现有 Rails 3.0.8 项目时对我有用的方法.您的里程可能会有所不同...

This is what worked for me when updating an existing rails 3.0.8 project. Your mileage may vary...

更新我的 Gemfile 中指定的 rails 版本以使用最新的候选版本:

Update the rails version specified in my Gemfile to use the latest release candidate:

gem 'rails', '3.1.0.rc4’

更新捆绑包:

bundle update

然后使用 rake 命令更新项目:

Then update the project with the rake command:

rake rails:update

虽然发生了变化冲突,但在挑选樱桃后,我运行了所有测试,结果都通过了(是的!).我重新启动了服务器,到目前为止一切都很好.

After cherry picking though the change conflicts I ran all my tests and they passed (yay!). I restarted the server and everything seems good so far.

但是,这还没有使用新的资产管道.我的意思是 javascript 和 css(或 sass)文件仍在以管道前的方式处理.据我了解,这是一个完全可行的选择.但当然,我想要新的优点,所以我相信接下来的步骤是包含和额外的 gems(例如 coffeescript、sass、uglifier 等),然后将旧文件迁移到 app/assets 目录.

However, this is not using the new asset pipeline yet. By that I mean the javascript and css (or sass) files are still being handled in the pre-pipeline manner. As I understand it, this is a perfectly viable option. But of course, I want the new goodness, so I believe the next steps are to include and additional gems (e.g. coffeescript, sass, uglifier, etc) and then to migrate the old files to the app/assets directory.

我在这里找到了一些细节:

I found some details about that are here:

blog.nodeta/2011/06/14/rails-3-1-asset-pipeline-in-the-real-world/

希望对您有所帮助.

更多推荐

从 Rails 3 升级到 Rails 3.1

本文发布于:2023-10-11 04:30:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1480687.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:升级到   Rails

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!