Ruby Gem passing variables for production versus qa versus dev

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?

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.

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

Hello, it really interesting, thanks support.transloadit.com good luck

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

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.