Skip to content

Instantly share code, notes, and snippets.

@pgwillia
Created November 5, 2025 23:55
Show Gist options
  • Save pgwillia/7511638820bc75947bca131d7a353f2a to your computer and use it in GitHub Desktop.
Save pgwillia/7511638820bc75947bca131d7a353f2a to your computer and use it in GitHub Desktop.
Flipper Feature Flags in Jupiter

Context

ualbertalib/jupiter#1897 - decision to use flipper gem ualbertalib/jupiter#1948 implements feature flags in Jupiter

Important parts:

https://github.com/ualbertalib/jupiter/blob/40a2b5d13b4af25e8d80a675a4da911aa74ff5da/Gemfile#L57-L59

gem 'flipper', '~> 1.3.4' # Feature flags for Ruby
gem 'flipper-active_record', '~> 1.3.4' # Store feature flags in ActiveRecord
gem 'flipper-ui', '~> 1.3.4' # UI for feature flags

We're not using flippercloud. We're self hosting. We don't need any of the paid features with this setup.

Feature Flag Concept

Suppose you have some code that does a thing

do_a_thing

Now you want to change the behaviour, but you want the ability to turn it off/on and give that ability to a user without code-churn and new deployments. Suppose the new behaviour is

do_another_thing

So we introduce conditional logic

if Flipper.enabled?(:another_thing)
  do_another_thing
else
  do_a_thing
end

State

User Interface

image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment