Ruby Gem passing variables for production versus qa versus dev

Started by matt15 replies16 views
matt1Original post
#1

Archived from the Transloadit support forum. Originally posted on September 10, 2012; details may be outdated, see our docs for current behavior. Original thread

I am using the Gem for a RoR project. I need to configure my setup so that I can deploy easily and have different templates for qa/dev/prod. How can I setup the gem so that it used different templates in each environment? Same auth keys but different templates. Currently I have a single transloadit.yml file in my config directory. Ideallly I want to do away with this file and move those keys into the config/environments/production.rb and config/environments/development/rb files. How can I best achieve this so that the jquery gem reads from the env rather than the yml file?

Robin_Mehner
#2

Hi there,

this is currently not possible with the gem (see https://github.com/transloadit/rails-sdk/issues/23)

A workaround at the moment would be either namespacing the templates (templatename_production) or overwriting the config on the fly. Both things are not clean. I hope that I’ll find some time this week to implement this into the gem. Will follow up then.

matt1
#3

Got it. I think I’ll wait until you can provide a “real” fix instead of trying a work around. Please let me know how it goes.

Thank you

Matt

matt1
#5

Hi Robin,
Any progress on this work on the GEM. I am now supporting 3 different env and this ability would be really helpful.

Thank you
Matt

Robin_Mehner
#6

Hi Matt,

sorry, not at the moment. I’ll implement it next week, this week is just super busy. But I aim for a release next week. I unfortunately don’t have any free time this week as I’m organizing two conferences which happen this Thursday and Friday. Next week should be better.