Provides Rails 8.0–8.1 knowledge patch covering Solid Queue/Cache/Cable (no Redis), Kamal 2 deployment, Propshaft, authentication generator, Turbo 8 morphing, params.expect, job continuations. Load before Rails work.
npx claudepluginhub nevaberry/nevaberry-plugins --plugin rails-knowledge-patchThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Implements structured self-debugging workflow for AI agent failures: capture errors, diagnose patterns like loops or context overflow, apply contained recoveries, and generate introspection reports.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Covers Rails 8.0–8.1 changes. Training cutoff: Rails 7.1, Ruby 3.3.
| Topic | Reference | Key features |
|---|---|---|
| Rails 8.0 architecture | references/rails-8-architecture.md | Solid Queue/Cache/Cable, Kamal 2, Propshaft, auth generator, Turbo morphing |
| Active Record queries & schema | references/active-record-queries.md | params.expect, pluck hash, UPDATE with JOIN, first/last deprecation, schema sorting |
| Active Record columns & serialization | references/active-record-columns.md | only_columns, update_column touch, serialized comparable, JSON coder, PG 18 virtual columns |
| Database configuration | references/database-config.md | Connection pool options, transaction isolation, SQLite extensions, invisible indexes |
| Active Job continuations | references/active-job-continuations.md | Resumable multi-step jobs with cursor tracking |
| Tooling & framework | references/tooling.md | Local CI, credentials:fetch, structured events, markdown rendering, deprecated associations |
| Deprecations & removals | references/deprecations.md | sidekiq adapter, ActiveSupport::Configurable, mb_chars, Active Storage Azure |
Rails 8.0 removes external dependencies:
FOR UPDATE SKIP LOCKED)kamal-proxy instead of Traefik)rails generate authentication) — session-based, password-resettableturbo_refreshes_with method: :morph, scroll: :preserve for DOM morphingallow_browser versions: :modern returns 406 for old browsersSee references/rails-8-architecture.md for full details, configuration, and code examples.
# New preferred way (safer, more explicit)
params.expect(post: [:title, :body])
# replaces: params.require(:post).permit(:title, :body)
create_virtual_table :posts_search, :fts5, ["content", "title"]
Product.in_batches(cursor: [:shop_id, :id]) do |relation|
# batches using composite cursor
end
Post.joins(:comments).pluck(:id, comments: :id)
db:migrate on a fresh database now loads the schema first, then runs only pending migrations. Use db:migrate:reset for the old behavior.
Long-running jobs broken into resumable steps via ActiveJob::Continuable:
class ProcessImportJob < ApplicationJob
include ActiveJob::Continuable
def perform(import_id)
step :validate do
# runs once
end
step :process do |step|
Record.find_each(start: step.cursor) do |record|
record.process
step.advance! from: record.id
end
end
step :finalize # calls private method
end
end
Rails.event.notify("user.signup", user_id: 123, email: "user@example.com")
Rails.event.tagged("graphql") { Rails.event.notify("query.executed", duration: 42) }
Rails.event.set_context(request_id: "abc123", shop_id: 456)
production:
adapter: postgresql
max_connections: 10 # renamed from pool (old name still works)
min_connections: 2
keepalive: 300
max_age: 600
ActiveRecord.with_transaction_isolation_level(:read_committed) do
Tag.create! # uses read_committed isolation
end
# Also: connection.current_transaction.isolation
has_many :posts, deprecated: true # warn mode (default)
has_many :posts, deprecated: { mode: :raise } # or :notify
has_many :posts, deprecated: { mode: :warn, backtrace: true }
Reports all usage: author.posts, author.preload(:posts), nested attributes, etc.
class User < ApplicationRecord
self.only_columns = %w[id name email]
end
Comment.joins(:post).update_all("title = posts.title")
Previously MySQL-only. Now works for PostgreSQL and SQLite3 (without LIMIT/ORDER/GROUP BY).
# config/ci.rb — run with bin/ci
CI.run do
step "Setup", "bin/setup --skip-server"
step "Style: Ruby", "bin/rubocop"
step "Tests: Rails", "bin/rails test"
if success?
step "Signoff", "gh signoff"
else
failure "CI failed.", "Fix the issues and try again."
end
end
rails credentials:fetch kamal.registry_password
# Useful in .kamal/secrets:
# KAMAL_REGISTRY_PASSWORD=$(rails credentials:fetch kamal.registry_password)
user.update_column(:nice, true, touch: true) # also updates updated_at
user.update_columns(last_ip: request.remote_ip, touch: true)
serialize :config, type: Hash, coder: JSON, comparable: true # avoids false dirty tracking
development:
adapter: sqlite3
extensions:
- SQLean::UUID # module responding to .to_path
- .sqlpkg/nalgeon/crypto/crypto.so # filesystem path
create_table :users do |t|
t.string :name
t.virtual :lower_name, type: :string, as: "LOWER(name)" # virtual on PG 18+
t.virtual :name_length, type: :integer, as: "LENGTH(name)", stored: true
end
# config/application.rb (Rails 8.1 default)
config.active_record.raise_on_missing_required_finder_order_columns = true
Raises ActiveRecord::MissingRequiredOrderError if no order, implicit_order_column, query_constraints, or primary_key.
ActiveRecord::CheckViolation — check constraint violationsActiveRecord::ExclusionViolation — PostgreSQL exclusion constraint violations| Feature | Version | Area |
|---|---|---|
| Solid Queue/Cache/Cable defaults | 8.0 | Infrastructure |
| Kamal 2 deployment | 8.0 | Deployment |
| Propshaft asset pipeline | 8.0 | Assets |
| Authentication generator | 8.0 | Security |
| Turbo 8 morphing | 8.0 | Hotwire |
allow_browser guard | 8.0 | Security |
params.expect | 8.0 | Controllers |
| SQLite virtual tables | 8.0 | Active Record |
| Custom batch cursors | 8.0 | Active Record |
| Pluck with hash | 8.0 | Active Record |
db:migrate loads schema first | 8.0 | Migrations |
| Job continuations | 8.1 | Active Job |
| Structured events | 8.1 | Framework |
Local CI (bin/ci) | 8.1 | Tooling |
| Markdown rendering | 8.1 | Action View |
credentials:fetch | 8.1 | Tooling |
| Deprecated associations | 8.1 | Active Record |
only_columns | 8.1 | Active Record |
update_column touch | 8.1 | Active Record |
| Connection pool config | 8.1 | Database |
| Transaction isolation | 8.1 | Active Record |
| Serialized comparable | 8.1 | Active Record |
| JSON coder options | 8.1 | Active Record |
| SQLite extensions in YAML | 8.1 | Database |
| Invisible indexes | 8.1 | MySQL/MariaDB |
| first/last without order deprecated | 8.1 | Active Record |
| UPDATE with JOIN (PG/SQLite) | 8.1 | Active Record |
| PG 18 virtual generated columns | 8.1 | PostgreSQL |
| Schema columns sorted | 8.1 | Migrations |
| New exception classes | 8.1 | Active Record |