0

I'm using Launch Darkly's ruby sdk as follows:

@client = LaunchDarkly::LDClient.new(<sdk_key>)
hash = Hash.new
@client.variation('flag_name', hash, false)

However, I keep getting an error stating [LDClient] Client has not finished initializing; feature store unavailable, returning default value

Does anyone know why this is the case? Thank you!

  • Take a look at this method's documentation: https://github.com/launchdarkly/ruby-server-sdk/blob/main/lib/ldclient-rb/ldclient.rb#L150 - it seems your client wasn't able to establish a connection to the remote server... – Konstantin Strukov Jun 27 '22 at 15:57
  • Thank you [Konstantin](https://stackoverflow.com/users/8008340/konstantin-strukov). For some reason @data_source.initalized is false. I'm trying to step through the debugger. I noticed that initialized.make_true is not being called here https://github.com/launchdarkly/ruby-server-sdk/blob/bb9b4d166101f04256deb29fe8c048332be94d4c/lib/ldclient-rb/in_memory_store.rb#L73 – interesteddeveloper1 Jun 29 '22 at 00:21

0 Answers0