Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

LaunchDarkly Sample Ruby Application


We've built a simple console application that demonstrates how LaunchDarkly's SDK works.


Below, you'll find the basic build procedure, but for more comprehensive instructions, you can visit your Quickstart page or the Ruby SDK reference guide.

This demo requires Ruby version 2.5.0 or higher (or, for JRuby, 9.2.0 or higher).

Build instructions


  1. Edit main.rb and set the value of sdk_key to your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, set feature_flag_key to the flag key.
sdk_key = "1234567890abcdef"

feature_flag_key = "my-flag"
  1. If you have not installed the bundler tool, run gem install bundler on the command line.

  2. On the command line, run bundle install

  3. Run bundle exec ruby main.rb

You should see the message "Feature flag '<flag key>' is <true/false> for this user".

Releases

No releases published

Packages

No packages published

Languages