# テストおよび開発用の環境変数の設定

**URL:** <https://meta.discourse.org/t/setting-environment-variables-for-test-and-development/138709>\
**Category:** Development\
**Created:** [2020 年 1 月 15 日午後 5:51 UTC](https://meta.discourse.org/t/setting-environment-variables-for-test-and-development/138709 "2020-01-15T17:51:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jamesmarkcook](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesmarkcook/32/168563_2.png) [@jamesmarkcook](https://meta.discourse.org/u/jamesmarkcook)\
**Post date:** [2020 年 1 月 15 日午後 7:14 UTC](https://meta.discourse.org/t/setting-environment-variables-for-test-and-development/138709/3 "2020-01-15T19:14:45Z")

</div>

残念ながら、その方法ではできません。私はプライベートなプラグインを開発中で、機密データをソース管理にコミットしないようにするために、環境変数を設定する必要があります。

本番サーバーでその環境変数を設定するのは問題ありませんが、テスト実行時など、テスト環境でもこれをロードできるようにしたいと考えています。インラインで指定することも可能ですが、できればよりスケーラブルな解決策を望んでいます。

私が投稿した理由は、その gem を追加することに違和感を覚えたからです。Discourse には既にこの問題に対する解決策があるはずだと思っていたからです。

---

_[View the full topic](https://meta.discourse.org/t/setting-environment-variables-for-test-and-development/138709)._
