{"id":3653,"date":"2010-02-08T17:36:40","date_gmt":"2010-02-08T09:36:40","guid":{"rendered":"http:\/\/ihower.tw\/blog\/?p=3653"},"modified":"2011-04-09T01:55:43","modified_gmt":"2011-04-08T17:55:43","slug":"rails3-beta","status":"publish","type":"post","link":"https:\/\/ihower.tw\/blog\/3653-rails3-beta","title":{"rendered":"Rails3 Beta \u767c\u4f48: \u91cd\u9ede\u5c0e\u89bd"},"content":{"rendered":"<p>Update(2010\/2\/22): <a href=\"http:\/\/www.railsupgradehandbook.com\/\">The Rails 3 Upgrade Handbook<\/a> \u53ef\u4ee5\u8cb7\u4f86\u770b\u3002<\/p>\n<p>\u5f9e Merb \u548c Rails \u6c7a\u5b9a<a href=\"http:\/\/weblog.rubyonrails.org\/2008\/12\/23\/merb-gets-merged-into-rails-3\">\u5408\u4f75<\/a>\u958b\u59cb\uff0c\u904e\u4e86\u4e00\u5e74\u591a\u7684\u52aa\u529b\u7d42\u65bc\u767c\u4f48 <a href=\"http:\/\/weblog.rubyonrails.org\/2010\/2\/5\/rails-3-0-beta-release\">Beta<\/a> \u7248\u5566\u3002Rails3 \u6700\u91cd\u8981\u7684\u4eba\u7269\u5c31\u662f\u7e3d\u67b6\u69cb\u5e2b <a href=\"http:\/\/yehudakatz.com\/\">Yehuda Katz<\/a> \u4e86\uff0c\u6574\u500b\u628a Rails core \u7ffb\u4e86\u597d\u5e7e\u7ffb\uff0c\u5fb9\u5e95\u6539\u982d\u63db\u9762\u3002<\/p>\n<p>Why? \u6211\u662f\u9019\u9ebc\u60f3\u7684\uff0cDHH \u4e00\u958b\u59cb\u958b\u767c Rails \u7684\u6642\u5019\uff0cRuby \u793e\u7fa4\u9084\u4e0d\u50cf\u73fe\u5728\u9019\u9ebc\u767c\u9054\uff0c\u6240\u4ee5\u5f88\u591a\u4e8b\u60c5\u5fc5\u9808\u81ea\u5df1\u9020(\u9023  <a href=\"http:\/\/prototypejs.org\">prototype<\/a> \u90fd\u662f\u70ba\u4e86 Rails \u800c\u9020\u7684)\uff0c\u70ba\u4e86\u9054\u5230\u975e\u5e38\u5bb9\u6613\u8a2d\u5b9a\u8ddf\u5feb\u901f\u958b\u767c\u7684\u7406\u60f3\uff0c\u5f97\u5305\u5c71\u5305\u6d77\u4ec0\u9ebc\u529f\u80fd\u90fd\u8981\u505a\uff0c\u518d\u52a0\u4e0a\u6709\u9650\u7684\u8cc7\u6e90\uff0c\u9020\u6210\u4e86 Rails core \u5176\u5be6\u7d81\u5f97\u5f88\u7dca\uff0c\u57fa\u672c\u4e0a\u5c31\u662f\u4e00\u6574\u5305\u7d66\u4f60\u3002\u8981\u4fee\u6539\u64f4\u5145\u5b83\uff0c\u5e38\u5e38\u5c31\u5fc5\u9808 monkeypatch \u4e00\u4e0b\u3002\u53e6\u4e00\u65b9\u9762\uff0c\u5c0d\u600e\u6a23\u7684 Ruby \u7a0b\u5f0f\u662f\u597d\u7a0b\u5f0f\uff0c\u4e00\u958b\u59cb\u4e5f\u6c92\u6709\u9019\u9ebc\u591a\u4eba\u60f3\u6e05\u695a\uff0c\u4f8b\u5982 Rails core \u5145\u6eff\u4e86  alias_method_chain\uff0c\u9019\u4ef6\u4e8b\u60c5\u73fe\u5728\u4e5f\u88ab\u8a8d\u70ba\u662f\u6bd4\u8f03\u4e0d\u597d\u7684\u5beb\u6cd5\u3002<\/p>\n<p>Rails3 \u7684\u6642\u4ee3\u4e0d\u540c\u4e86\uff0cRuby \u793e\u7fa4\u8d77\u4f86\u4e86\u3002\u6211\u5011\u6709\u6a19\u6e96\u7684 <a href=\"http:\/\/rack.rubyforge.org\/\">Rack<\/a> \u4ecb\u9762\u3001\u6211\u5011\u6709\u4e0d\u540c\u7684ORM\u751a\u81f3\u662f NoSQL \u7684\u5132\u5b58\u5eab\u3001\u6211\u5011\u6709\u4e0d\u540c JS Libary\u3001\u6211\u5011\u6709\u4e0d\u540c\u6e2c\u8a66\u65b9\u5f0f <a href=\"http:\/\/rspec.info\/\">RSpec<\/a>\u3001\u6211\u5011\u4e5f\u6709\u8a31\u591a\u73fe\u6210\u4e0d\u9700\u8981\u81ea\u5df1\u9020\u7684\u65b0\u51fd\u5f0f\u5eab\u3002Rails3 \u57fa\u672c\u4e0a\u5c31\u662f\u9019\u9ebc\u4e00\u500b\u63a5\u8fd1\u6539\u6389\u91cd\u5beb\u7684\u7248\u672c\uff0c\u4f46\u662f\u4ee5\u91cd\u69cb\u7684\u65b9\u5f0f\u9054\u6210\u4e86\u9019\u500b\u517c\u5bb9\u4e26\u84c4\u7684\u76ee\u6a19\uff1a\u5c07 API \u91cd\u65b0\u91d0\u6e05\u3001\u5fb9\u5e95\u6a21\u7d44\u5316\u3001\u4f4e\u8026\u5408\u5ea6\u5143\u4ef6\u3001\u5927\u5e45\u63d0\u6607\u6548\u80fd\u7b49\u3002\u5177\u9ad4\u4f86\u8aaa\uff0c\u6709\u5e7e\u500b\u6210\u679c\uff1a<\/p>\n<h3>\u4f7f\u7528 Ruby 1.8.7 \u6216 Ruby 1.9.2<\/h3>\n<p>1.9 \u7684\u6642\u4ee3\u7d42\u65bc\u8981\u4f86\u81e8\u4e86 :) \u53ef\u4ee5\u8907\u7fd2\u4e00\u4e0b\u6211\u53bb\u5e74\u6f14\u8b1b\u7684<a href=\"http:\/\/ihower.tw\/blog\/archives\/2722\">\u6295\u5f71\u7247<\/a>\u3002<\/p>\n<h3>Dependencies \u7ba1\u7406<\/h3>\n<p>\u672c\u4f86\u7684 config.gem \u63db\u6210\u65b0\u7684 <a href=\"http:\/\/github.com\/carlhuda\/bundler \">Bundler<\/a> \u4f86\u7ba1\u7406\u6240\u6709\u7528\u5230\u7684\u51fd\u5f0f\u5eab\uff0c\u4f7f\u7528\u65b0\u7684 Gemfiles \u683c\u5f0f\uff0c\u672c\u4f86\u7684 config.gem sucks \u554f\u984c\u591a\u529f\u80fd\u6709\u9650\u3002\u73fe\u5728\uff0c\u6211\u5011\u771f\u7684\u505a\u5230\u53ef\u4ee5\u5b8c\u5168\u4e0d\u4f9d\u9760\u7cfb\u7d71 gems\u3002\u53ef\u4ee5\u53c3\u8003\u9019\u7bc7 <a href=\"http:\/\/www.lindsaar.net\/2010\/2\/6\/bundle_me_some_rails\">Bundle me some Rails<\/a> \u548c <a href=\"http:\/\/yehudakatz.com\/2010\/02\/09\/using-bundler-in-real-life\/\">Using Bundler in Real Life<\/a> \u793a\u7bc4 Bundle \u7684\u7528\u6cd5<\/p>\n<h3>\u65b0\u7684 Routes<\/h3>\n<p>\u7531\u65bc\u5168\u9762\u5c0e\u5165 Rack \u7684\u95dc\u4fc2\uff0c\u73fe\u5728\u7684 Route \u5176\u5be6\u4e5f\u662f\u4e00\u500b Rack middleware\uff0c\u5be6\u4f5c\u4e0a\u5c31\u662f <a href=\"http:\/\/github.com\/josh\/rack-mount\">rack-mount<\/a>\u3002\u65b0\u7684 Route \u7b2c\u4e00\u773c\u770b\u5230\u5c31\u662f API \u7684\u6539\u8b8a\u4e86\uff0c\u53ef\u4ee5\u53c3\u8003\u9019\u7bc7  <a href=\"http:\/\/rizwanreza.com\/2009\/12\/20\/revamped-routes-in-rails-3\">Revamped Routes in Rails 3<\/a> \u548c <a href=\"http:\/\/www.engineyard.com\/blog\/2010\/the-lowdown-on-routes-in-rails-3\/\">The Lowdown on Routes in Rails 3<\/a>\uff0c\u4e0d\u904e\u9019\u5176\u5be6\u4e0d\u662f\u6700\u91cd\u8981\u7684\u5730\u65b9\uff0c\u6700\u53b2\u5bb3\u7684\u5730\u65b9\u662f\uff0c\u5b83\u53c3\u6578 :to \u63a5\u7684\u7aef\u9ede\u5176\u5be6\u662f rack \u7aef\u9ede\uff0c\u800c main#home \u662f MainController.action(:home) \u7684\u7c21\u5beb( \u662f\u7684!! Rails3 \u4e2d\u6bcf\u500b Controller actions \u5168\u90fd\u662f\u4e00\u500b\u6a19\u6e96\u7684 Rack app!! \u8d85\u9177!!)\uff0c\u53ef\u4ee5\u770b\u770b Yehuda \u7684<a href=\"http:\/\/yehudakatz.com\/2009\/12\/26\/the-rails-3-router-rack-it-up\/\">\u5be6\u4f5c\u8aaa\u660e<\/a>\u3002\u65e2\u7136\u662f Rack \u7aef\u9ede\uff0c\u6211\u5011\u5c31\u53ef\u4ee5\u7d66\u5b83\u63a5\u5176\u4ed6 Rack app\uff0c\u4f8b\u5982 Sinatra\uff0c\u9019\u4e00\u7bc7\u5c31\u793a\u7bc4\u4e86\u600e\u9ebc\u63a5 <a href=\"http:\/\/lindsaar.net\/2010\/2\/7\/rails_3_routing_with_rack\">Rails 3 Routing with Rack<\/a>\uff0c\u771f\u662f\u8d85\u7d1a\u7c21\u55ae\u554a\u3002\u6211\u5011\u53ef\u4ee5\u9810\u671f\uff0c\u6703\u6709\u66f4\u591a\u6709\u8da3\u7684 <a href=\"http:\/\/www.rubyinside.com\/21-rack-middlewares-2649.html\">Rack middlewares<\/a> \u53ef\u4ee5\u8207 Rails \u7d50\u5408\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u6211\u5011\u4e5f\u53ef\u4ee5\u76f4\u63a5\u5728 Routes \u5c64\u76f4\u63a5\u8fa6\u5230 redirect \u548c render template\uff0c\u53ef\u4ee5\u770b\u770b Yehuda \u7684\u5be6\u4f5c\u8aaa\u660e\uff1a<a href=\"http:\/\/yehudakatz.com\/2009\/12\/20\/generic-actions-in-rails-3\">Generic Actions in Rails 3<\/a>\uff0c\u57fa\u672c\u4e0a\u5c31\u662f\u7c21\u55ae\u7684 Rack middleware\u3002<\/p>\n<h3>\u65b0\u7684 Active Model<\/h3>\n<p>\u70ba\u4e86\u9054\u5230\u8207\u4e0d\u540c ORM \u929c\u63a5\u7684\u76ee\u6a19\uff0cRails3 \u7684 ActiveModel \u5c07\u672c\u4f86\u7684 ActiveRecord \u7684\u500b\u5225\u529f\u80fd\u62bd\u51fa\u4f86\u6210\u70ba Module\uff0c\u4f8b\u5982 callbacks, validations, serialization, observing,  dirty tracking \u7b49\u3002\u4efb\u4f55 Class \u53ea\u8981\u7b26\u5408 ActiveModel \u5b9a\u7fa9\u7684\u5e7e\u500b API\uff0c\u518d\u52a0\u4e0a include \u4f60\u9700\u8981\u7684 Module\uff0c\u5c31\u53ef\u4ee5\u8207 Rails3 \u63a5\u5728\u4e00\u8d77\u4e86\u3002\u8acb\u53c3\u95b1 <a href=\"http:\/\/yehudakatz.com\/2010\/01\/10\/activemodel-make-any-ruby-object-feel-like-activerecord\/\">ActiveModel: Make Any Ruby Object Feel Like ActiveRecord<\/a>\u3002<\/p>\n<p>\u5176\u4e2d Validation \u6709\u65b0\u7684 API\uff0c\u8acb\u53c3\u95b1 <a href=\"http:\/\/lindsaar.net\/2010\/1\/31\/validates_rails_3_awesome_is_true\">validates :rails_3, :awesome => true<\/a><\/p>\n<h3>ActiveRecord<\/h3>\n<p>\u90a3 ActiveRecord \u672c\u8eab\u5462? \u5f15\u5165\u4e86 <a href=\"http:\/\/github.com\/brynary\/arel\">ARel<\/a> \u9019\u5957 SQL \u7522\u751f\u5de5\u5177(<a href=\"http:\/\/magicscalingsprinkles.wordpress.com\/2010\/01\/28\/why-i-wrote-arel\/\">why Arel?<\/a>)\uff0c\u5927\u5e45\u63a1\u7528 &#8220;method chain&#8221; \u7684\u4e32\u63a5\u7528\u6cd5\uff0c\u8b93\u6bcf\u500b\u64cd\u4f5c\u90fd\u8b8a\u6210\u4e86 scope\u3002<\/p>\n<p>ActiveRecord \u56e0\u6b64\u4e5f\u6709\u4e86\u65b0\u7684 API: <a href=\"http:\/\/m.onkey.org\/2010\/1\/22\/active-record-query-interface\">Active Record Query Interface 3.0<\/a><\/p>\n<h3>ActionController<\/h3>\n<p>Responder \u5e36\u4f86\u4e86 respond_with\uff0c\u53ef\u4ee5\u7c21\u5316 controller \u7684\u5beb\u6cd5\uff0c\u7528\u6cd5\u53c3\u8003 <a href=\"http:\/\/ryandaigle.com\/articles\/2009\/8\/6\/what-s-new-in-edge-rails-cleaner-restful-controllers-w-respond_with\">Cleaner RESTful Controllers w\/ respond_with<\/a>\u3001<a href=\"http:\/\/ryandaigle.com\/articles\/2009\/8\/10\/what-s-new-in-edge-rails-default-restful-rendering\">Default RESTful Rendering<\/a> \u548c <a href=\"http:\/\/weblog.rubyonrails.org\/2009\/8\/31\/three-reasons-love-responder\">Three reasons to love ActionController::Responder<\/a> \u9019\u5e7e\u7bc7\u3002\u9019\u5de5\u5177\u975e\u5e38\u6709\u8da3\uff0c\u6211\u4e4b\u524d\u751a\u81f3\u5beb\u4e86\u4e00\u500b plugin <a href=\"http:\/\/github.com\/ihower\/respond_methods\">respond_methods<\/a> \u4f86\u8b93  Rails 2.x \u652f\u63f4\u9019\u500b\u529f\u80fd\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u65b0\u7684 Render \u5be6\u4f5c\u53ef\u4ee5\u8b93\u4f60\u8f15\u6613\u64f4\u5c55\uff0c\u9019\u4e00\u7bc7 <a href=\"http:\/\/www.engineyard.com\/blog\/2010\/render-options-in-rails-3\/\">Render Options in Rails 3<\/a> \u793a\u7bc4\u4e86\u600e\u9ebc\u505a\u51fa\u4f60\u81ea\u5df1\u7684 render :pdf\u3002<\/p>\n<h3>ActionView<\/h3>\n<p>\u5e7e\u500b\u5927\u7684\u6539\u8b8a\uff1a <\/p>\n<p>1. \u63a1\u7528  <a href=\"http:\/\/www.kuwata-lab.com\/erubis\/\">Erubis<\/a> \u5be6\u4f5c<br \/>\n2. \u9810\u8a2d XSS protection \u6253\u958b\uff0c\u518d\u4e5f\u4e0d\u7528\u5fd8\u8a18\u52a0\u4e0a h \u9038\u51fa\u4e86\u3002\u8acb\u53c3\u8003 <a href=\"http:\/\/yehudakatz.com\/2010\/02\/01\/safebuffers-and-rails-3-0\/\">SafeBuffers and Rails 3.0<\/a> \u6709\u66f4\u591a\u7d30\u7bc0<br \/>\n3. \u5c07\u6240\u6709 JavaScript helpers \u6539\u6210 unobtrusive\u3002\u4f60\u6703\u767c\u73fe Rails3 \u7684 public\/javascripts \u591a\u4e86\u4e00\u500b rails.js\uff0c\u9019\u5c31\u662f\u4e00\u500b JS driver\uff0c\u9810\u8a2d\u662f\u63a5 prototype.js\uff0c\u8981\u63db\u6210 jQuery \u975e\u5e38\u7c21\u55ae\uff0c\u53ea\u8981\u7528 jQuery \u7248\u672c\u7684 <a href=\"http:\/\/github.com\/rails\/jquery-ujs\/raw\/master\/src\/rails.js\">rails.js<\/a> \u5c31\u53ef\u4ee5\u4e86\u3002\u56e0\u6b64\u672c\u4f86\u7684\u4e00\u4e9b Ajax Helper \u5c31\u88ab\u79fb\u9664\u4e86\uff0c\u6709\u9700\u8981\u7684\u8a71\u53ef\u4ee5\u5728 <a href=\"http:\/\/github.com\/rails\/prototype_legacy_helper\">prototype_legacy_helper<\/a> plugin \u627e\u56de\u4f86\u3002<br \/>\n4. Helpers \u9810\u8a2d\u8f38\u51fa\u683c\u5f0f\u662f HTML 5\u3002<\/p>\n<p>\u8aaa\u5230 HTML5\uff0c\u6211\u53e6\u5916\u63a8\u85a6\u9019\u4efd\u95b1\u8b80\u6750\u6599 <a href=\"http:\/\/diveintohtml5.org\/\">Dive into HTML5<\/a> \u4ee5\u53ca <a href=\"http:\/\/html5demos.com\/\">HTML 5 Demos and Examples<\/a>\u3002<\/p>\n<h3>ActionMailer<\/h3>\n<p>\u9996\u5148\u5e95\u5c64\u63db\u6210 <a href=\"http:\/\/github.com\/mikel\/mail\">Mail<\/a> \u9019\u5957\u5de5\u5177\u4e86\uff0c\u53ef\u4ee5\u53c3\u8003\u9019\u7bc7<a href=\"http:\/\/lindsaar.net\/2010\/1\/23\/mail-gem-version-2-released\">\u4ecb\u7d39<\/a>\u3002\u63a5\u8457\uff0c\u53d7\u76ca\u65bc Controller \u7684\u91cd\u69cb\u6210\u679c\uff0c\u65b0\u7684 ActionMailer \u7d42\u65bc\u548c Controller \u7e7c\u627f\u81ea\u540c\u4e00\u500b AbstractController\uff0c\u8b93 ActionMailer \u7684\u529f\u80fd\u589e\u52a0\u4e0d\u5c11\uff0c\u4e5f\u5927\u5927\u7684 DRY \u4e86\u3002<\/p>\n<p>\u65b0\u7684 API \u8acb\u53c3\u8003 <a href=\"http:\/\/lindsaar.net\/2010\/1\/26\/new-actionmailer-api-in-rails-3\">New ActionMailer API in Rails 3.0<\/a><\/p>\n<p>\u6700\u5f8c\u5b83\u7684\u4f4d\u7f6e\u6539\u653e\u5728 app\/mailers \u4e86\uff0c\u653e\u5728 app\/models \u4e0b\u5be6\u5728\u8b93\u4eba\u641e\u6df7\u554a\u3002<\/p>\n<h3>ActiveSupport<\/h3>\n<p>\u4e4b\u524d\u7684 ActiveSupport \u6709\u500b\u8a0e\u53ad\u7684\u5730\u65b9\u662f\uff0c\u5982\u679c\u4f60\u53ea\u60f3\u8981\u7528\u5230\u5176\u4e2d\u7684\u5e7e\u500b\u529f\u80fd\uff0c\u5f88\u4e0d\u5bb9\u6613\u641e\u61c2\u5230\u5e95\u8981 require \u54ea\u4e9b\u6771\u897f\uff0c\u6700\u5f8c\u53ea\u597d\u901a\u901a\u8f09\u5165\u4ee5\u6c42\u4fdd\u96aa\u3002\u65b0\u7684 Rails3 \u628a\u9019\u4ef6\u4e8b\u60c5\u5f04\u6e05\u695a\u4e86\uff0c\u4f60\u53ef\u4ee5\u53ea\u8f09\u5165\u4f60\u8981\u7684\u90e8\u5206\u3002<\/p>\n<h3>Rails Application object<\/h3>\n<p>\u70ba\u4e86\u8b93\u4e00\u500b Process \u53ef\u4ee5\u8dd1\u591a\u500b Rails app\uff0cRails3 \u4f7f\u7528\u4e86\u4e00\u500b Rails Application \u7269\u4ef6\u4f86\u8868\u793a\u4e00\u6574\u500b Application \u7684\u6240\u6709\u8a2d\u5b9a\uff0c\u56e0\u6b64\u672c\u4f86\u7684 config\/environment.rb \u7684\u529f\u80fd\uff0c\u5e7e\u4e4e\u90fd\u642c\u5230 config\/application.rb \u4e86\u3002\u53e6\u5916\uff0cRack \u7684\u6a19\u6e96 config.ru \u6a94\u6848\u4e5f\u88ab\u52a0\u5230\u4e86\u6839\u76ee\u9304\uff0c\u56e0\u6b64\u8981\u7279\u5225\u6ce8\u610f\u5230\u4f60\u7684 Application \u540d\u7a31\uff0c\u9019\u6703\u662f\u8ddf\u5176\u4ed6 Application \u4e92\u52d5\u6642\u4f7f\u7528\u7684\u540d\u7a31\uff0c\u9810\u8a2d\u662f\u76ee\u9304\u7684\u540d\u5b57\u3002<\/p>\n<h3>\u65b0\u7684 Rails Module<\/h3>\n<p>\u5e7e\u500b\u5e38\u6578\u88ab\u62ff\u6389\u4e86\uff0cRAILS_ROOT \u8981\u6539\u7528 Rails.root\u3001RAILS_ENV \u8981\u6539\u7528 Rails.env\u3001RAILS_DEFAULT_LOGGER \u8981\u6539\u7528  Rails.logger \u7b49\uff0c\u8a73\u7d30\u8acb\u53c3\u95b1\u9019\u7bc7 <a href=\"http:\/\/litanyagainstfear.com\/blog\/2010\/02\/03\/the-rails-module\/\">The Rails Module (in Rails 3)<\/a>\u3002\u6539\u6210\u7269\u4ef6\u7684\u597d\u8655\u662f\uff0c\u6211\u5011\u5c31\u4e0d\u9700\u8981\u505a\u5b57\u4e32\u64cd\u4f5c\u9019\u7a2e\u4e8b\u60c5\u4e86\u3002<\/p>\n<h3>\u65b0\u7684 rails \u6307\u4ee4<\/h3>\n<p>\u672c\u4f86\u7684 script\/* \u6307\u4ee4\u5168\u90e8\u62ff\u6389\u4e86\uff0c\u90fd\u6539\u6210\u7528 rails\u3002\u4f8b\u5982 script\/console \u8b8a\u6210 rails console (\u53ef\u4ee5\u7c21\u5beb\u6210 rails c)\u3001script\/generate \u8b8a\u6210 rails generate (\u53ef\u4ee5\u7c21\u5beb\u6210 rails g)\u3001script\/server \u8b8a\u6210 rails server(\u53ef\u4ee5\u7c21\u5beb\u6210 rails s)\u3002\u4f7f\u7528 rails &#8211;help \u53ef\u4ee5\u770b\u5230\u5b8c\u6574\u8aaa\u660e\u3002<\/p>\n<h3>\u63a8\u85a6\u95b1\u8b80<\/h3>\n<p>Rails3 \u7684\u95b1\u8b80\u8cc7\u6599\u975e\u5e38\u591a\uff0c\u5b98\u65b9\u7684 <a href=\"http:\/\/guides.rails.info\/3_0_release_notes.html\">Rails 3.0: Release Notes<\/a> \u662f\u5fc5\u8b80\u3002\u5982\u679c\u4f60\u5f9e\u5347\u7d1a\u7684\u65b9\u5411\u5207\u5165\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b98\u65b9\u7684\u5347\u7d1a Plugin <a href=\"http:\/\/omgbloglol.com\/post\/364624593\/rails-upgrade-is-now-an-official-plugin\">rails-upgrade is now an official plugin<\/a>\uff0c\u5b83\u53ef\u4ee5\u5e6b\u52a9\u4f60 1. \u6aa2\u67e5\u9700\u8981\u5347\u7d1a\u7684\u5730\u65b9 2. \u7522\u751f Gemfile 3. \u7522\u751f\u65b0\u7684 routes.rb\u3002\u8acb\u642d\u914d\u9019\u7bc7 <a href=\"http:\/\/omgbloglol.com\/post\/353978923\/the-path-to-rails-3-approaching-the-upgrade\">The Path to Rails 3: Approaching the upgrade<\/a> \u670d\u7528\u3002\u4e0d\u904e\uff0c\u55ef\uff0c\u73fe\u5728\u9084\u662f\u4e0d\u8981\u5728 Production \u74b0\u5883\u4e0a\u5347\u7d1a\u6bd4\u8f03\u597d\uff0c\u7562\u7adf\u5f88\u591a Plugin \u9084\u6c92\u8ddf\u4e0a\u4f86\u54e9 (\u53ef\u4ee5\u770b\u770b <a href=\"http:\/\/railsplugins.org\/\">Is Your Plugin Ready For Rails 3?<\/a> \u548c <a href=\"http:\/\/wiki.rubyonrails.org\/rails\/version3\/plugins_and_gems\">Rails Wiki<\/a> \u6709\u6574\u7406\u54ea\u4e9b Plugins OK \u4e86)\u3002<\/p>\n<p>\u5982\u679c\u662f\u5f9e\u91cd\u65b0\u958b\u59cb\u6703\u5bb9\u6613\u5f97\u591a\uff0c\u53ef\u4ee5\u770b <a href=\"http:\/\/omgbloglol.com\/post\/371893012\/the-path-to-rails-3-greenfielding-new-apps-with-the\">The Path to Rails 3: Greenfielding new apps with the Rails 3 beta<\/a> \u9019\u7bc7\u3002\u5341\u5206\u5efa\u8b70\u4f60\u6709\u7a7a\u7684\u8a71\uff0c\u73fe\u5728\u5c31\u53ef\u4ee5\u958b\u59cb\u73a9\u73a9\u770b\u4e86\u3002<\/p>\n<p>\u5982\u679c\u60f3\u591a\u4e86\u89e3 Rails \u7684\u67b6\u69cb\uff0c\u6709\u5e7e\u7bc7\u6587\u7ae0\u53ef\u4ee5\u770b\u770b\uff1a<\/p>\n<ul>\n<li><a href=\"http:\/\/omgbloglol.com\/post\/344792822\/the-path-to-rails-3-introduction\">The Path to Rails 3: Introduction<\/a> (\u7b97\u662f\u6700\u7c21\u55ae\u7684\u4e00\u7bc7\uff0c\u53ef\u4ee5\u770b\u770b)<\/li>\n<li><a href=\"http:\/\/www.engineyard.com\/blog\/2010\/rails-3-beta-is-out-a-retrospective\/\">Rails 3 Beta is Out \u2014 A Retrospective<\/a><\/li>\n<li><a href=\"http:\/\/www.engineyard.com\/blog\/2009\/rails-and-merb-merge-the-anniversary-part-1-of-6\/\">Rails and Merb Merge: The Anniversary (Part 1 of 6)<\/a><\/li>\n<li><a href=\"http:\/\/www.engineyard.com\/blog\/2009\/rails-and-merb-merge-performance-part-2-of-6\/\">Rails and Merb Merge: Performance (Part 2 of 6)<\/a><\/li>\n<li><a href=\"http:\/\/www.engineyard.com\/blog\/2010\/rails-and-merb-merge-plugin-api-part-3-of-6\/\">Rails and Merb Merge: Plugin API (Part 3 of 6)<\/a><\/li>\n<li><a href=\"http:\/\/www.engineyard.com\/blog\/2010\/rails-and-merb-merge-rails-core-part-4-of-6\/\">Rails and Merb Merge: Rails Core (Part 4 of 6)<\/a><\/li>\n<li><a href=\"http:\/\/www.engineyard.com\/blog\/2010\/rails-and-merb-merge-orm-agnosticism-part-5-of-6\/\">Rails and Merb Merge: ORM Agnosticism (Part 5 of 6)<\/a><\/li>\n<li><a href=\"http:\/\/www.engineyard.com\/blog\/2010\/rails-and-merb-merge-rack-part-6-of-6\/\">Rails and Merb Merge: Rack (Part 6 of 6)<\/a><\/li>\n<\/ul>\n<p>\u6700\u5f8c\uff0c\u5982\u679c\u4f60\u9084\u60f3\u627e\u66f4\u591a\uff0c\u82f1\u6587\u7684\u61f6\u4eba\u5305\u6709\uff1a<a href=\"http:\/\/edgerails.info\/articles\/what-s-new-in-edge-rails\/2010\/02\/10\/rails-3-resources\/\">Rails 3 Resources<\/a>\u3001<a href=\"http:\/\/www.rubyinside.com\/rails-3-0-beta-links-2966.html\">Rails 3.0 Beta: 36 Links and Resources To Get You Going<\/a>\u3001<a href=\"http:\/\/mediumexposure.com\/rails-3-reading-material\/\">Rails 3 Reading Material<\/a>\u3001<a href=\"http:\/\/railslove.com\/weblog\/2010\/02\/02\/on-the-way-to-rails-3-a-link-list\/\">On the way to Rails 3 &#8211; a link list<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update(2010\/2\/22): The Rails 3 Upgrade Handbook \u53ef\u4ee5\u8cb7\u4f86\u770b\u3002  &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/ihower.tw\/blog\/3653-rails3-beta\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008Rails3 Beta \u767c\u4f48: \u91cd\u9ede\u5c0e\u89bd\u3009<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[53,31],"tags":[],"class_list":["post-3653","post","type-post","status-publish","format-standard","hentry","category-rails","category-ruby","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1q6tG-WV","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/posts\/3653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/comments?post=3653"}],"version-history":[{"count":71,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/posts\/3653\/revisions"}],"predecessor-version":[{"id":5532,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/posts\/3653\/revisions\/5532"}],"wp:attachment":[{"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/media?parent=3653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/categories?post=3653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/tags?post=3653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}