Do you mind explaining a bit more about what you are trying to do? If you can share a specific example (i.e. have the R session start with the MY_VARIABLE env var set to the value blah), that can be helpful to answering your question and solving your problem.
In any case, it sounds like you are trying to set an environment variable for all users on the server. There are a few ways to do this. This section of the admin guide might be helpful.
In particular, rsession-ld-library-path only affects the LD_LIBRARY_PATH environment variable, but can be useful if that is what you are trying to edit. What you may be looking for instead is setting global variables in /etc/environment or customizing the startup of R itself with .Renviron, Renviron.site, or something of that nature (note that this configuration needs to be done for each installed version of R):
This article should be helpful on that front
If your question is more about the implementation of Gurobi, that would be helpful to have some clarification about as well. I for one am unfamiliar with Gurobi and what it takes to make it work.