Docs / Getting Started / Installation

Installation

Detailed installation instructions for adding Flagstack to your Ruby application.

Requirements

  • Ruby 3.0 or later
  • Rails 7.0 or later (for Rails integration)
  • Flipper gem

Install the Gems

Add the following to your Gemfile:

Gemfile

# Feature flags
gem "flagstack"
gem "flipper"

# Recommended: ActiveRecord adapter for persistent local storage
gem "flipper-active_record"

Run bundle install:


$ bundle install

Generate Configuration

Run the Flagstack installer to generate the initializer:


$ rails generate flagstack:install

If using ActiveRecord adapter for persistent local storage, generate and run the migration:


$ rails g flipper:active_record
$ rails db:migrate

Environment Variables

Set your Flagstack API token as an environment variable:

.env

FLAGSTACK_TOKEN=your_api_token_here

Keep your token secure

Never commit your API token to version control. Use environment variables or a secrets manager.

© 2026 Flagstack. All rights reserved.