Transform a Rails application to use Falcon web server with async job processing (async-job), async Action Cable, and Redis-compatible database (Valkey for production). Use when the user wants to add async/Falcon stack to a Rails project, migrate from Puma to Falcon, or set up async job processing with Redis for both development and production environments including Kamal deployment.
Transform a Rails application to use the Falcon web server with async job processing, async Action Cable, and Redis-compatible database (Valkey for production). This skill handles the complete migration from Puma to Falcon, configures async job adapters, sets up Redis/Valkey for Action Cable and job queues, and configures Kamal deployment for production.
Use this skill when the user:
Before applying this skill, verify:
Gemfile, config/application.rb)config/environments/ directorybundleconfig/deploy.ymlFollow these steps in order to transform a Rails application to use the async/Falcon stack:
Replace Puma with Falcon and add async dependencies:
bundle remove puma
bundle add falcon
bundle add async-job-processor-redis
bundle add async-job-adapter-active_job
bundle add async-cable
bundle add redis
After running these commands, verify the Gemfile includes:
gem "falcon"gem "async-job-processor-redis"gem "async-job-adapter-active_job"gem "async-cable"gem "redis" (provides Async::Redis::Endpoint for endpoint parsing)CRITICAL: The async/Falcon stack requires OpenSSL development libraries to build properly. Without this, Docker builds will fail.
Edit the Dockerfile and add libssl-dev to the system dependencies.
Find the line that installs build packages (usually around line 40):
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential git libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives
Update it to include libssl-dev:
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential git libyaml-dev libssl-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives
Why this is needed: The Falcon web server and async gems depend on native extensions that require OpenSSL headers to compile. Without libssl-dev, the Docker build will fail with compilation errors.
Create config/initializers/async_job.rb with the following content:
require "async/job"
require "async/job/processor/aggregate"
require "async/job/processor/redis"
require "async/job/processor/inline"
require "async/redis/endpoint"
Rails.application.configure do
# Resolve Redis endpoint from REDIS_URL; fallback to localhost for dev/test.
redis_endpoint = Async::Redis::Endpoint.parse(
ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" }
)
config.async_job.define_queue "default" do
enqueue Async::Job::Processor::Aggregate
# Ensure the job runner connects to the accessory container (or localhost in dev).
dequeue Async::Job::Processor::Redis, endpoint: redis_endpoint
end
config.async_job.define_queue "local" do
dequeue Async::Job::Processor::Inline
end
end
This configuration:
Update Procfile.dev to include the async job processor:
Add this line to the existing Procfile.dev: