Latest in branch 3.0
3.0.20
Released 28 Jan 2013
(13 years ago)
SoftwareRuby on Rails
Version3.0
Status
End of life
Initial release3.0.0
30 Aug 2010
(15 years ago)
Latest release3.0.20
28 Jan 2013
(13 years ago)
End of bug fixesUnavailable
End of security fixesUnavailable
Release noteshttps://github.com/rails/rails/releases/tag/v3.0.20
Source codehttps://github.com/rails/rails/tree/v3.0.20
Downloadhttps://github.com/rails/rails/releases/tag/v3.0.20
Ruby on Rails 3.0 ReleasesView full list

What Is New in Ruby on Rails 3.0

Category Highlights
New Features Application object (config/application.rb), script/rails command, Bundler/Gemfile, Active Model abstraction, AbstractController, Arel integration, Mail gem extraction, Action Dispatch router.
Improvements Unified generators API, hookable Railties, default HTML5 output, automatic HTML escaping, built-in CSRF protection, responder pattern, I18n enhancements, optional edge/dev flags for rails new.
Breaking Changes Ruby 1.8.7+ required, removal of config.gem, script/* scripts replaced, rake freeze dropped, old routing DSL deprecated, RAILS_ROOT/RAILS_ENV constants removed.
Deprecations config.gem, rake freeze, filter_parameter_logging, cookie_verifier_secret, RAILS_ROOT, RAILS_ENV, RAILS_DEFAULT_LOGGER, old map routing commands.

How does Rails 3 change the way we configure and start a new application?

The first step is now to run rails new myapp, which generates a Gemfile and a config/application.rb Application object.

  • All environment-specific settings live inside the Application object; config/environment.rb is now a thin loader.
  • The old script/ scripts are gone; rails console and rails generate replace them.
  • Dependencies are managed by Bundler. Run bundle install to resolve the Gemfile and you can vendor gems with bundle install --path vendor/bundle.
# Example Gemfile
source 'https://rubygems.org'

gem 'rails', '3.0.0'
gem 'pg'
gem 'puma'

In practice this means a cleaner, reproducible setup and eliminates the need for config.gem calls.

What are the major architectural shifts introduced in Rails 3?

Rails 3 decouples core components and introduces a unified plugin API via Railties.

  • Railties rewrite: Generators, engines, and plugins now share a single API; you can place custom generators under lib/templates and hook into any stage.
  • Active Model: Provides a thin interface (validations, callbacks, naming) that any ORM can implement, allowing DataMapper or Sequel to plug into Action Pack.
  • AbstractController: Extracts rendering, helpers, and callbacks from ActionController, enabling ActionMailer and other libraries to inherit the same base.
  • Arel: Powers the new relation-based query interface; all Active Record queries now return an Arel::Relation object that can be chained.
  • Mail gem extraction: Email parsing and delivery are delegated to the standalone mail gem, reducing ActionMailer's footprint.

Watch out for the compatibility layer: the old Active Record API still works but will be removed after Rails 3.1.

How has routing and controller handling been revamped in Rails 3?

Rails 3 introduces Action Dispatch, a Rack-based router with a modern DSL.

  • Routes are defined inside AppName::Application.routes do ... end instead of the old map block.
  • New helpers: match, scope, constraints, and root simplify complex routing scenarios.
  • Controllers now inherit from ActionController::Base which itself inherits from AbstractController::Base; protect_from_forgery is enabled by default.
  • The responder pattern (respond_with and ActionController::Responder) streamlines format negotiation.
# config/routes.rb
MyApp::Application.routes do
  root to: 'home#index'
  resources :posts
  match '/search', to: 'search#show', via: [:get, :post]
end

This matters if you rely on the legacy catch-all route; it is now commented out and will disappear in Rails 3.1.

What updates to Active Record and validations should I be aware of in Rails 3?

Active Record now returns chainable relations powered by Arel, and validations live in Active Model.

  • New query methods: where, select, order, limit, etc., all return an Arel::Relation that can be further chained.
  • Validations are available via ActiveModel::Validations; the classic validates_presence_of still works, but you can also use the hash-style validates :title, presence: true, length: { maximum: 50 }.
  • Custom validators are simple Ruby classes inheriting from ActiveModel::EachValidator.
# app/models/post.rb
class Post < ActiveRecord::Base
  validates :title, presence: true, length: { maximum: 100 }
  validates :slug, uniqueness: true
end

In practice, the new API makes complex queries more readable and lets you swap the ORM without rewriting validation logic.

Which APIs were deprecated or removed in Rails 3 and what should I replace them with?

Rails 3 removes several legacy entry points and replaces them with modern equivalents.

  • config.gem → use a Gemfile and Bundler.
  • script/*rails command (e.g., rails console, rails server).
  • rake freezebundle install --path vendor/bundle to vendor gems.
  • RAILS_ROOT / RAILS_ENV / RAILS_DEFAULT_LOGGERRails.root, Rails.env, Rails.logger.
  • filter_parameter_loggingconfig.filter_parameters << :password in an initializer.
  • old map routing → new DSL inside Application.routes with resources, match, etc.

Most teams will need to audit initializers, Rake tasks, and plugin code for these patterns before the upgrade.

Frequently Asked Questions

Can I still use Ruby 1.9.1 with Rails 3?
Rails 3 crashes on Ruby 1.9.1; you need Ruby 1.9.2 or later.

Do I have to rewrite all my models to use Active Model?
No, existing Active Record models continue to work unchanged.

How do I generate a scaffold in Rails 3?
Run rails generate scaffold Post title:string body:text and the new generators will create the files.

Is the old config.gem syntax still supported?
It has been removed; you must list gems in a Gemfile and run bundle install.

What command replaces rake freeze?
Use bundle install --path vendor/bundle to vendor your gems.

Will my existing Rake tasks still load automatically?
Tasks must now reside in lib/tasks; tasks in PLUGIN/tasks are no longer loaded.

Releases In Branch 3.0

VersionRelease date
3.0.2028 Jan 2013
(13 years ago)
3.0.1908 Jan 2013
(13 years ago)
3.0.1823 Dec 2012
(13 years ago)
3.0.1709 Aug 2012
(13 years ago)
3.0.1626 Jul 2012
(13 years ago)
3.0.1512 Jun 2012
(13 years ago)
3.0.1412 Jun 2012
(13 years ago)
3.0.1331 May 2012
(14 years ago)
3.0.13.rc128 May 2012
(14 years ago)
3.0.1201 Mar 2012
(14 years ago)
3.0.12.rc122 Feb 2012
(14 years ago)
3.0.1118 Nov 2011
(14 years ago)
3.0.1016 Aug 2011
(14 years ago)
3.0.10.rc104 Aug 2011
(14 years ago)
3.0.916 Jun 2011
(14 years ago)
3.0.9.rc512 Jun 2011
(14 years ago)
3.0.9.rc412 Jun 2011
(14 years ago)
3.0.9.rc309 Jun 2011
(14 years ago)
3.0.9.rc209 Jun 2011
(14 years ago)
3.0.9.rc108 Jun 2011
(14 years ago)
3.0.807 Jun 2011
(14 years ago)
3.0.8.rc430 May 2011
(15 years ago)
3.0.8.rc330 May 2011
(15 years ago)
3.0.8.rc227 May 2011
(15 years ago)
3.0.8.rc125 May 2011
(15 years ago)
3.0.718 Apr 2011
(15 years ago)
3.0.7.rc215 Apr 2011
(15 years ago)
3.0.7.rc114 Apr 2011
(15 years ago)
3.0.605 Apr 2011
(15 years ago)
3.0.6.rc230 Mar 2011
(15 years ago)
3.0.6.rc129 Mar 2011
(15 years ago)
3.0.526 Feb 2011
(15 years ago)
3.0.5.rc123 Feb 2011
(15 years ago)
3.0.409 Feb 2011
(15 years ago)
3.0.4.rc131 Jan 2011
(15 years ago)
3.0.316 Nov 2010
(15 years ago)
3.0.215 Nov 2010
(15 years ago)
3.0.115 Oct 2010
(15 years ago)
3.0.030 Aug 2010
(15 years ago)
3.0.0_RC223 Aug 2010
(15 years ago)
3.0.0_RC26 Jul 2010
(15 years ago)
3.0.0.beta408 Jun 2010
(15 years ago)
3.0.0.beta313 Apr 2010
(16 years ago)
3.0.0.beta.313 Apr 2010
(16 years ago)
3.0.0.beta201 Apr 2010
(16 years ago)
3.0.0.beta.201 Apr 2010
(16 years ago)
3.0.0.beta105 Feb 2010
(16 years ago)