从 Rails 3 升级到 Rails 3.1 [英] Upgrading from Rails 3 to 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:
http://blog.nodeta.com/2011/06/14/rails-3-1-asset-pipeline-in-the-real-world/
希望对您有所帮助.
这篇关于从 Rails 3 升级到 Rails 3.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!