I need to shell out to a process while setting an environment variable for it. I tried this one-liner:
system \"RBENV_VERSION=system ruby extconf.rb\"
This may work?
system <<-CMD export VARNAME=123 other_command CMD