Skip to content

ENV vars in rails console

Overview

Environment variables in GDK are set using runit

But when running gdk rails console or a rake task, these environment variables are not picked up. Would it be possible to inject the same environment variables into a console as well?

This came up in a recent MR review

Impacted categories

The following categories relate to this issue:

Steps to replicate (optional)

  1. Set an env var via env.runit in the GDK root
  2. Open a rails console in gitlab
  3. ENV var is nil

Proposal (optional)

Environment (optional)

  • Operating system name: <!-- output of `uname -a` command -->
  • Architecture: <!-- output of `arch` command -->
  • The contents of your gdk.yml (if any)
  • Ruby version: <!-- output of `ruby --version` command -->
  • GDK version: <!-- output of `git rev-parse --short HEAD` command -->