Reputation: 3183
I've been playing around with Open Shift and tried to pass an environment variable. First, I set it with rhc env set TEST=foo -a myApp
. Then I ensured it was there with rhc env list -a myAPP
, and it was.
Nest, in my app, I put Test variable = <%= ENV['TEST'] %>
, but nothing shows up after I deploy. Is there something I'm missing here? Running ruby 2.0 cartridge with Sinatra, fwiw.
Upvotes: 0
Views: 154
Reputation: 1484
the document of rhc I've just check, it is now
rhc app-start <appname>
rhc app-stop <appname>
Upvotes: 0
Reputation:
Try doing a "stop" and "start" on your application (not a restart) and see if they show up, i believe the ruby cartridge just touches "tmp/restart.txt" in your rails application/passenger to restart it, which does not reload apache and pick up new environment variables (would probably do something similar with rack based applications that are not rails also)
rhc app <appname> stop
rhc app <appname> start
Upvotes: 3