āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/clerk/clerk-docs/reference/ruby/v4-upgrade-guide ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
clerk-sdk-ruby v4
description: Learn how to upgrade your application to use Clerk Ruby SDK v4.
sdk: rubyIn January 2025, version 4.0 of the Clerk Ruby SDK was released. This guide covers the breaking changes that were introduced.
Clerk.configure updatesPreviously, Clerk.configure accepted api_key as a parameter. Now, it accepts secret_key instead.
require 'clerk'
Clerk.configure do |c|
c.api_key = `{{secret}}`
c.secret_key = `{{secret}}`
end
middleware_cache_store updatesPreviously, if Rails was detected, the middleware_cache_store was set to Rails.cache. Otherwise, it was set to nil.
Now, if Rails is not detected, the middleware_cache_store attempts to use ActiveSupport::Cache::MemoryStore before defaulting to nil.
With the introduction of our generated Ruby HTTP Client, the Clerk::SDK class methods have all been overhauled to align with the Clerk OpenAPI specification{{ target: '_blank' }}.
Refer to the Ruby HTTP Client documentation{{ target: '_blank' }} for more information on what methods are available via the Clerk::SDK class or the clerk.sdk helper method.
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā