From 8fac028e0beb1f19edc092da9c8c704b9d0faff9 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 3 Feb 2010 14:23:06 +1100 Subject: [PATCH 1/6] Updated release notes --- railties/guides/source/3_0_release_notes.textile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/railties/guides/source/3_0_release_notes.textile b/railties/guides/source/3_0_release_notes.textile index e1dcd1f519fb..e8d924864661 100644 --- a/railties/guides/source/3_0_release_notes.textile +++ b/railties/guides/source/3_0_release_notes.textile @@ -1,4 +1,4 @@ -h2. Ruby on Rails 3.0 Release Notes +h2. Ruby on Rails 3.0 Beta Release Notes Rails 3.0 is a landmark release as it delivers on the Merb/Rails merge promise made in December 2008. Rails 3.0 provides major upgrades to all of the components of Rails, including a complete overhaul of the router and query APIs. @@ -11,6 +11,8 @@ These release notes cover the major upgrades, but don't include every little bug endprologue. +NOTE: These release notes are still being modified. Rails 3.0 beta is not out yet, so be sure to check back here on release date to find any changes. Comments and corrections welcome, please send to "Mikel Lindsaar":http://lindsaar.net or contribute via Doc Rails. + h3. Upgrading from Rails 2.3.5 to Rails 3.0 As always, having a high coverage, passing test suite is your friend when upgrading. You should also first upgrade to Rails 2.3.5 and make sure your application still runs as expected before attempting to update to Rails 3.0. In general, the upgrade from Rails 2.x to 3.0 centers around three big changes: @@ -18,7 +20,7 @@ As always, having a high coverage, passing test suite is your friend when upgrad h4. New Ruby Version Requirement -WARNING: Rails only runs on version 1.8.7 of Ruby or later. Support for previous versions of Ruby has been dropped and Rails 3.0 will no longer boot on any of these versions. +WARNING: Rails 3.0 was built to run on Ruby version 1.8.7. Support for previous versions of Ruby has been dropped and Rails 3.0 will no longer boot on any of these versions. h4. The new boot process @@ -57,7 +59,7 @@ h3. Application Creation As stated above, you must be on Ruby 1.8.7 or later to boot up a Rails application. Rails will no longer boot on Ruby 1.8.6 or earlier. -Rails 3.0 is designed to run on 1.8.7 and also support Ruby 1.9. +Rails 3.0 is designed to run on 1.8.7, support for 1.9.x is still in testing. There have been a few changes to the +rails+ script that's used to generate Rails applications: @@ -70,7 +72,6 @@ The new installing rails sequence (for the beta) is: $ gem install rails --prerelease $ rails myapp $ cd myapp -$ bundle install h4. Vendoring Gems From a5647c12af8be6d34385b78df7f9d6c8216f918b Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 3 Feb 2010 14:26:28 +1100 Subject: [PATCH 2/6] Fixing up the idea of bundle and freezing gems --- railties/guides/source/3_0_release_notes.textile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/guides/source/3_0_release_notes.textile b/railties/guides/source/3_0_release_notes.textile index e8d924864661..b9f00cad613b 100644 --- a/railties/guides/source/3_0_release_notes.textile +++ b/railties/guides/source/3_0_release_notes.textile @@ -83,7 +83,9 @@ More information: - "Using bundler":http://yehudakatz.com/2009/11/03/using-the-n h4. Living on the Edge -Due to the use of +Gemfile+, your Rails app is "frozen" by default, that is, all the gems you depend on are kept in your vendor directory, these gems are copied from your system gems by default or from gemcutter. If you want to bundle straight from the Git repository, you can pass the edge flag: +Due to the use of the +Bundler+ gem with +Gemfile+, you can "freeze" your Rails app at any time through the bundle command, so the concept of rake freeze has been dropped. + +If you want to bundle straight from the Git repository, you can pass the edge flag: $ rails myapp --edge From cc1f693a87089b1fae86f49b9f9fb43ff65fc9e1 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 3 Feb 2010 14:28:20 +1100 Subject: [PATCH 3/6] Adding note about not being final and we want contributions --- railties/guides/source/3_0_release_notes.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/3_0_release_notes.textile b/railties/guides/source/3_0_release_notes.textile index b9f00cad613b..a3084a49ad95 100644 --- a/railties/guides/source/3_0_release_notes.textile +++ b/railties/guides/source/3_0_release_notes.textile @@ -11,7 +11,7 @@ These release notes cover the major upgrades, but don't include every little bug endprologue. -NOTE: These release notes are still being modified. Rails 3.0 beta is not out yet, so be sure to check back here on release date to find any changes. Comments and corrections welcome, please send to "Mikel Lindsaar":http://lindsaar.net or contribute via Doc Rails. +NOTE: These release notes are still being modified constantly. Rails 3.0 beta is not out yet, so be sure to check back here on the actual release date to find any changes. Comments and corrections welcome, please send to "Mikel Lindsaar":http://lindsaar.net or "@raasdnil"::http://twitter.com/raasdnil or contribute via Doc Rails. h3. Upgrading from Rails 2.3.5 to Rails 3.0 From b2159936628dc25375be123eb179211b79e7c8b2 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 3 Feb 2010 16:02:17 +1100 Subject: [PATCH 4/6] Fixing all the 'script' references --- railties/guides/source/3_0_release_notes.textile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/railties/guides/source/3_0_release_notes.textile b/railties/guides/source/3_0_release_notes.textile index a3084a49ad95..c7afad089187 100644 --- a/railties/guides/source/3_0_release_notes.textile +++ b/railties/guides/source/3_0_release_notes.textile @@ -28,6 +28,11 @@ h4. The new boot process As part of the shift to treating Rails apps as Rack endpoints, you are now required to have a +config/application.rb+ file, which takes over much of the work +config/environment.rb+ used to handle. Along with that comes a lot of internal change to the boot process, but those changes are mostly internal. +h4. New rails binary + +The +rails+ binary has been upgraded in Rails 3.0 It lives as script/rails and is a one stop command for all of the commands that used to live in script/. You now call rails instead. + + h4. Gems and gems and gems The +config.gem+ method is gone and has been replaced by using +bundler+ and a +Gemfile+, see "Vendoring Gems":#vendoring-gems below. @@ -45,7 +50,7 @@ To help with the upgrade process, a plugin named "Rails Upgrade":http://github.c Simply install the plugin, then run +rake rails:upgrade:check+ to check your app for pieces that need to be updated (with links to information on how to update them). It also offers a task to generate a +Gemfile+ based on your current +config.gem+ calls and a task to generate a new routes file from your current one. To get the plugin, simply run the following: -script/plugin install git://github.com/rails/rails_upgrade.git +rails plugin install git://github.com/rails/rails_upgrade.git You can see an example of how that works at "Rails Upgrade is now an Official Plugin":http://omgbloglol.com/post/364624593/rails-upgrade-is-now-an-official-plugin @@ -175,7 +180,7 @@ Railties generators got a huge amount of attention in Rails 3.0, basically: * Generators were completely rewritten and are backwards incompatible. * Rails templates API and generators API were merged (they are the same as the former). -* Generators are no longer loaded from special paths anymore, they are just found in the Ruby load path, so calling script/generate foo will look for generators/foo_generator. +* Generators are no longer loaded from special paths anymore, they are just found in the Ruby load path, so calling rails generate foo will look for generators/foo_generator. * New generators provide hooks, so any template engine, ORM, test framework can easily hook in. * New generators allow you to override the templates by placing a copy at RAILS_ROOT/lib/templates. * Rails::Generators::TestCase is also supplied so you can create your own generators and test them. From 7ebabb18bebd00df9a799db95229c7e038b589b3 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 3 Feb 2010 16:10:07 +1100 Subject: [PATCH 5/6] Fixed up i18n info on release notes --- railties/guides/source/3_0_release_notes.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/railties/guides/source/3_0_release_notes.textile b/railties/guides/source/3_0_release_notes.textile index c7afad089187..23e216c0d844 100644 --- a/railties/guides/source/3_0_release_notes.textile +++ b/railties/guides/source/3_0_release_notes.textile @@ -155,14 +155,14 @@ More Information: - "Rails Documentation Projects":http://weblog.rubyonrails.org h3. Internationalization -Rails has many improvements in I18n support, including the latest "I18n":http://github.com/svenfuchs/i18n gem supplying many speed improvements. +A large amount of work has been done with I18n support in Rails 3, including the latest "I18n":http://github.com/svenfuchs/i18n gem supplying many speed improvements. * I18n for any object - I18n behavior can be added to any object by including ActiveModel::Translation and ActiveModel::Validations. There is also an errors.messages fallback for translations. * Attributes can have default translations. * Form Submit Tags automatically pull the correct status (Create or Update) depending on the object status, and so pull the correct translation. * Labels with I18n also now work by just passing the attribute name. -More Information: - "Speedup for I18n":http://blog.plataformatec.com.br/2009/12/run-i18n-run/ +More Information: - "Speedup for I18n":http://blog.plataformatec.com.br/2010/02/rails-3-i18n-changes/ h3. Railties From 54d01ce65611e3574aa0c7f0cd3ec4cfb2bebf99 Mon Sep 17 00:00:00 2001 From: James Miller Date: Tue, 2 Feb 2010 23:34:44 -0800 Subject: [PATCH 6/6] Remove a Rails 2 convention from namespaced routes --- railties/guides/source/routing.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile index c764597a6535..96dbd0dcd049 100644 --- a/railties/guides/source/routing.textile +++ b/railties/guides/source/routing.textile @@ -271,7 +271,7 @@ This can be especially useful when map multiple namespaced routes together using namespace :admin do - admin.resources :photos, :videos + resources :photos, :videos end