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

**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:** 6

<div class="post-metadata">

**Author:** ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Post date:** [2020 年 7 月 6 日午前 11:07 UTC](https://meta.discourse.org/t/setting-environment-variables-for-test-and-development/138709/6 "2020-07-06T11:07:20Z")

</div>

プラグイン内で `ENV['yourkey'] = 'yourval'` を設定すれば動作します。私は本日、コードのテストのためにこれを使用しました。

また、モード固有の gem をインストールすることもできます。私はまだ試していませんが、例を以下に示します。[discourse-assign/Gemfile at main · discourse/discourse-assign · GitHub](https://github.com/discourse/discourse-assign/blob/master/Gemfile)

---

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