2

Rbenv uses rbenv-vars to specify per-application environment variables in Rails.

Most version managers read the .env file in every project for the environment variables.

However, I can't find a way to make asdf-vm and asdf-ruby to read the .env file and export all the env variables in there (or any file with the env variables).

The docs on the same are quite scanty.

How do you set environment variables using asdf-vm or asdf-ruby on a Rails project?

Kyle Strand
  • 15,941
  • 8
  • 72
  • 167
Kaka Ruto
  • 4,581
  • 1
  • 31
  • 39

1 Answers1

0

You can use the plugin asdf-vars for this. The env file is called .asdf-vars and functions the same as a .rbenv-vars file.

As of writing this, you will need to modify asdf's command-exec.bash file to get the plugin to work. There is a discussion here about making the process easier.

wintermute
  • 110
  • 5