You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[This was shared by another developer; I'm sharing it here on their behalf]
I'm starting to use the keen.io ruby gem and I have feedback. On some hosting systems (like EngineYard), it is very complicated to configure libraries using environment variables. Instead, they recommend using a yaml file which is in a backed-up folder https://support.cloud.engineyard.com/entries/36999448-Environment-Variables-and-Why-You-Shouldn-t-Use-Them. I looked at the code (default_client specifically) and it looks like a "manual configuration" from an initializer would be a bit fragile. I would have to make sure I artificially set the env vars before bundler is loaded, so that the default client is not generated with empty credentials. That, or create my own instance of Keen::Client (which I'm probably going to do). Well - just a bit of feedback; in some case, using env vars is really not possible (which actually made me delay the use of keen.io several times already).
The text was updated successfully, but these errors were encountered:
Thanks for sharing. I would suggest manual configuration of the default client or a new client instance. Here are examples of both:
# load the configuration, wherever it may beconfig=YAML.load("/path/to/config.yaml")# configure default instanceKeen.project_id=config[:project_id]Keen.write_key=config[:write_key]Keen.read_key=config[:read_key]Keen.master_key=config[:master_key]# or configure new client instancekeen=Keen::Client.new(:project_id=>config[:project_id],:write_key=>config[:write_key],:read_key=>config[:read_key],:master_key=>config[:master_key])
[This was shared by another developer; I'm sharing it here on their behalf]
I'm starting to use the keen.io ruby gem and I have feedback. On some hosting systems (like EngineYard), it is very complicated to configure libraries using environment variables. Instead, they recommend using a yaml file which is in a backed-up folder https://support.cloud.engineyard.com/entries/36999448-Environment-Variables-and-Why-You-Shouldn-t-Use-Them. I looked at the code (default_client specifically) and it looks like a "manual configuration" from an initializer would be a bit fragile. I would have to make sure I artificially set the env vars before bundler is loaded, so that the default client is not generated with empty credentials. That, or create my own instance of Keen::Client (which I'm probably going to do). Well - just a bit of feedback; in some case, using env vars is really not possible (which actually made me delay the use of keen.io several times already).
The text was updated successfully, but these errors were encountered: