flippercloud/flipper · error · RuntimeError
#{gate} is not supported by this adapter yet
Error message
#{gate} is not supported by this adapter yet What it means
The PStore adapter (shipped inside the flipper gem) persists gate values under 'feature_key/gate_key' paths and picks the storage operation from Gate#data_type inside a transaction: :boolean clears all gates then writes, :integer writes, :set appends a member, :json writes via Typecast.to_json; the else branch raises (lib/flipper/adapters/pstore.rb:77-92). All built-in gates map to those four types and Feature#gates is a fixed set (lib/flipper/feature.rb:412-420), so this raise comes from a gate the adapter was never taught — a custom Gate subclass or a spec double — or a flipper release old enough to predate the :json branch receiving expression writes.
Source
Thrown at lib/flipper/adapters/pstore.rb:90
read_many_features(features)
end
end
# Public
def enable(feature, gate, thing)
@store.transaction do
case gate.data_type
when :boolean
clear_gates(feature)
write key(feature, gate), thing.value.to_s
when :integer
write key(feature, gate), thing.value.to_s
when :set
set_add key(feature, gate), thing.value.to_s
when :json
write key(feature, gate), Typecast.to_json(thing.value)
else
raise "#{gate} is not supported by this adapter yet"
end
end
true
end
# Public
def disable(feature, gate, thing)
case gate.data_type
when :boolean
clear(feature)
when :integer
@store.transaction do
write key(feature, gate), thing.value.to_s
end
when :set
@store.transaction do
set_delete key(feature, gate), thing.value.to_sView on GitHub (pinned to 1f86de3ec9)
Solutions
- List the gate types to find the offender: feature.gates.map { |g| [g.key, g.data_type] } — anything outside %i[boolean integer set json] is the problem.
- Re-map the custom gate's data_type to :json (values serialize with Flipper::Typecast.to_json and read back with from_json) or another supported type.
- Fix spec doubles to return a real built-in gate or a supported data_type symbol.
- If the running flipper predates :json support (pre-expression releases), upgrade the flipper gem — current releases handle :json in PStore#enable.
Example fix
# before: custom gate with an unknown data type class Gates::Bucket < Flipper::Gate def data_type = :float # PStore#enable raises '... is not supported by this adapter yet' end # after: reuse the json data type class Gates::Bucket < Flipper::Gate def data_type = :json # stored via Typecast.to_json, read via Typecast.from_json end
Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED = %i[boolean integer set json].freeze
def gates_persistable?(feature)
feature.gates.all? { |g| SUPPORTED.include?(g.data_type) }
end
raise ArgumentError, 'unsupported gate in feature set' unless gates_persistable?(feature) Type guard
def supported_data_type?(gate) %i[boolean integer set json].include?(gate.data_type) end
Try / catch
begin
feature.enable(thing)
rescue RuntimeError => e
raise unless e.message.include?('is not supported by this adapter yet')
warn "flipper/pstore: gate #{feature.key} rejected: #{e.message}"
end Prevention
- Map custom gate values onto :json (Typecast.to_json/from_json) instead of new data types.
- Check gate.data_type via Gate#inspect when adding gates to confirm it reports a supported symbol.
- Avoid spec doubles for gates; use the real Flipper::Gates classes.
- Upgrade flipper as a whole so the pstore adapter and gate set always match.
When it happens
Trigger: feature.enable(...) (or enable_actor/enable_percentage_of_*) where gate_for(thing) matches a custom gate or test double whose data_type is not :boolean/:integer/:set/:json — for example a gate ported from a patched flipper fork that added a data type such as :float.
Common situations: Building custom targeting gates against the pstore adapter; a monorepo where one app runs a patched flipper with extra data types while another writes via stock pstore; RSpec gate doubles that omit data_type.
Related errors
- #{data_type} is not supported by this adapter
- #{data_type} is not supported by this adapter
- #{data_type} is not supported by this adapter
- Group #{name.inspect} has already been registered
- Your database needs to be migrated to use the latest Flipper
AI-assisted analysis of flippercloud/flipper@1f86de3ec9 (2026-08-23).
Data as JSON: /api/errors/a5b9a939ae3818b8.
Report an issue: GitHub.