so right after I SSH into the deployed instance, I got below error
ssh xxxx-abc@ssh.oregon.render.com
iex -S mix
returned
** (Mix) You're trying to run :my_app on Elixir v1.9.4 but it has declared in its mix.exs file it supports only Elixir ~> 1.12
Render’s default elixir is 1.9 and my deployed app is running on 1.12 by specifying ELIXIR_VERSION=1.12.1 in my environment variable.
But how can I spin up the ssh instance with the correct elixir version?
Just to clarify: You have a Render service that is successfully running with Elixir 1.12, but when you SSH into the instance it’s defaulting to Elixir 1.9?
It looks like Render runs a command behind the scenes to detect the version when starting or connecting to your service from most contexts, but it doesn’t run when connecting via SSH. Can you try running:
ELIXIR_ENV_FILE=/home/render/elixir-env.sh; [ -f "$ELIXIR_ENV_FILE" ] && source "$ELIXIR_ENV_FILE"; after connecting?
I’ll share this with the team to see how we can support this without needing to run the command manually.