Latest in branch 3.2
3.2.22.5
Released 14 Sep 2016
(9 years ago)
SoftwareRuby on Rails
Version3.2
Status
End of life
Initial release3.2.0
20 Jan 2012
(14 years ago)
Latest release3.2.22.5
14 Sep 2016
(9 years ago)
End of bug fixesUnavailable
End of security fixesUnavailable
Release noteshttps://github.com/rails/rails/releases/tag/v3.2.22.5
Source codehttps://github.com/rails/rails/tree/v3.2.22.5
Downloadhttps://github.com/rails/rails/releases/tag/v3.2.22.5
Ruby on Rails 3.2 ReleasesView full list

What Is New in Ruby on Rails 3.2

Category Highlights
New Features Faster development mode with class-reloading on change, Journey routing engine, Automatic EXPLAIN for slow queries, TaggedLogging, ActiveRecord::Relation#explain, store, pluck, uniq, first_or_create, with_lock.
Improvements Configurable log tags, auto_explain_threshold_in_seconds, reload_classes_only_on_change flag, exceptions_app middleware, DebugExceptions middleware, scaffold 204 responses for API, richer generators (indexes, uniq, decimal precision).
Bug Fixes Fixed MIME type guessing for send_file, corrected CSRF token warning level, improved send_file MIME detection, fixed mass_assignment_sanitizer behavior, addressed Ruby 1.8.7 marshalling bugs in REE.
Breaking Changes Requires Ruby ≥ 1.8.7 (1.9.2 recommended), vendor/plugins deprecated (removed in Rails 4.0), Rails::Plugin removed, set_table_name and related setters deprecated, default charset moved to config.action_dispatch.default_charset.
Deprecations Rails::Plugin, vendor/plugins, ActionController::UnknownAction, ActionController::DoubleRenderError, method_missing for actions, old plugin generator, old config.paths API, set_table_name family, implicit layout lookup, render :template format/handler syntax.

How does Rails 3.2 improve development speed and routing?

Rails 3.2 makes the development environment noticeably faster by reloading classes only when the underlying files change.

  • Class reloading is driven by config.reload_classes_only_on_change; set it to false to revert to the old eager reload.
  • The new Journey routing engine speeds up route recognition, which is especially visible in large apps with many routes.
  • Development mode now logs the query plan for any query that exceeds config.active_record.auto_explain_threshold_in_seconds (default 0.5 s).

In practice, teams see a 30-40 % reduction in request latency while working locally, and the faster route lookup reduces console startup time for rake routes.

What new Active Record features does Rails 3.2 add for query performance and convenience?

Rails 3.2 adds several Active Record helpers that let you diagnose and optimise queries without leaving the console.

  • Automatic EXPLAIN: Queries slower than the threshold automatically call explain and log the plan.
  • Relation#explain: Manually invoke Model.where(...).explain to see the underlying SQL plan.
  • #pluck: Retrieves a single column directly from the DB, e.g. Client.where(active: true).pluck(:id).
  • #uniq: Generates SELECT DISTINCT queries, e.g. Client.select(:name).uniq.
  • #first_or_create / #first_or_initialize: Clearer alternatives to the old dynamic find_or_create_by methods.
  • #with_lock: Wraps a pessimistic lock in a transaction, simplifying safe concurrent updates.
  • store: Provides a simple key/value column for JSON-like data without a separate table.

These helpers reduce the amount of custom SQL you need to write and make it easier to catch missing indexes before they become production bottlenecks.

How does Rails 3.2 enhance logging and debugging for production applications?

Rails 3.2 introduces TaggedLogging and configurable log tags to make log lines more searchable.

  • Enable tags in config.log_tags = [:subdomain, :uuid] and Rails will prepend each line with the subdomain and request UUID.
  • The new ActiveSupport::TaggedLogging works with the existing Rails.logger and respects config.log_level.
  • config.active_record.mass_assignment_sanitizer = :strict raises an exception on unsafe mass-assignment, surfacing bugs early.
  • The DebugExceptions middleware replaces parts of ShowExceptions, giving you a cleaner error page and easier hook for custom error handling via config.exceptions_app.

In production, tagging logs with request IDs makes it trivial to trace a single request across multiple services, and the stricter mass-assignment checks reduce security regressions.

What are the major deprecations and breaking changes developers must address when upgrading to Rails 3.2?

Rails 3.2 removes several legacy APIs that will break older applications if not updated.

  • Ruby version requirement raised to ≥ 1.8.7; Ruby 1.9.1 segfaults, so upgrade to 1.9.2 or later.
  • vendor/plugins is deprecated; move plugins to gems or place them under lib/ with an initializer.
  • Rails::Plugin and the old rails generate plugin command are removed; use rails plugin new instead.
  • Setter methods like set_table_name, set_primary_key, etc., are deprecated in favor of self.table_name = style assignments.
  • Implicit layout lookup when a parent controller defines a layout is gone; explicitly set layout nil if you need the old behavior.
  • ActionController::UnknownAction and DoubleRenderError are replaced by their AbstractController equivalents.

Watch out for these changes early in the upgrade cycle; most teams spend a day refactoring plugins and updating model declarations.

Frequently Asked Questions

Do I need to upgrade Ruby before moving to Rails 3.2?
Yes, Rails 3.2 requires Ruby 1.8.7 or newer; Ruby 1.9.2 is recommended for best compatibility.

How can I enable automatic query EXPLAIN in development?
Set config.active_record.auto_explain_threshold_in_seconds = 0.5 in config/environments/development.rb.

What is the recommended way to replace a vendor/plugin?
Extract the plugin into a gem and add it to your Gemfile, or move the code under lib/ and require it via an initializer.

Can I still use the old rails generate plugin command?
No, the old command is removed; use rails plugin new to create a new plugin.

How do I tag logs with the request UUID?
Add config.log_tags = [:uuid] to the appropriate environment file.

What code example creates a scoped migration for an engine?
Run rake db:migrate SCOPE=blog to migrate only the blog engine's migrations.

Releases In Branch 3.2

VersionRelease date
3.2.22.514 Sep 2016
(9 years ago)
3.2.22.411 Aug 2016
(9 years ago)
3.2.22.310 Aug 2016
(9 years ago)
3.2.22.229 Feb 2016
(10 years ago)
3.2.22.125 Jan 2016
(10 years ago)
3.2.2216 Jun 2015
(10 years ago)
3.2.2117 Nov 2014
(11 years ago)
3.2.2029 Oct 2014
(11 years ago)
3.2.1902 Jul 2014
(11 years ago)
3.2.1806 May 2014
(12 years ago)
3.2.1718 Feb 2014
(12 years ago)
3.2.1602 Dec 2013
(12 years ago)
3.2.1516 Oct 2013
(12 years ago)
3.2.15.rc311 Oct 2013
(12 years ago)
3.2.15.rc204 Oct 2013
(12 years ago)
3.2.15.rc103 Oct 2013
(12 years ago)
3.2.1422 Jul 2013
(12 years ago)
3.2.14.rc216 Jul 2013
(12 years ago)
3.2.14.rc112 Jul 2013
(12 years ago)
3.2.1318 Mar 2013
(13 years ago)
3.2.13.rc206 Mar 2013
(13 years ago)
3.2.13.rc127 Feb 2013
(13 years ago)
3.2.1210 Feb 2013
(13 years ago)
3.2.1108 Jan 2013
(13 years ago)
3.2.1023 Dec 2012
(13 years ago)
3.2.912 Nov 2012
(13 years ago)
3.2.9.rc309 Nov 2012
(13 years ago)
3.2.9.rc201 Nov 2012
(13 years ago)
3.2.9.rc129 Oct 2012
(13 years ago)
3.2.809 Aug 2012
(13 years ago)
3.2.8.rc203 Aug 2012
(13 years ago)
3.2.8.rc101 Aug 2012
(13 years ago)
3.2.726 Jul 2012
(13 years ago)
3.2.7.rc123 Jul 2012
(13 years ago)
3.2.612 Jun 2012
(13 years ago)
3.2.531 May 2012
(14 years ago)
3.2.431 May 2012
(14 years ago)
3.2.4.rc128 May 2012
(14 years ago)
3.2.330 Mar 2012
(14 years ago)
3.2.3.rc229 Mar 2012
(14 years ago)
3.2.3.rc127 Mar 2012
(14 years ago)
3.2.201 Mar 2012
(14 years ago)
3.2.2.rc122 Feb 2012
(14 years ago)
3.2.126 Jan 2012
(14 years ago)
3.2.020 Jan 2012
(14 years ago)
3.2.0.rc204 Jan 2012
(14 years ago)
3.2.0.rc119 Dec 2011
(14 years ago)