forked from iroddis/asdf-R
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrating with RStudio for macOS #7
Labels
Comments
I was able to run RStudio with this command:
RStudio opens, but is then unable to find a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am able to get asdf and RStudio working together very well on my Linux machine, but am having trouble with my macbook. On Linux, after setting an R version with
asdf local R <version>
, simply runningrstudio
in the project directory will open a new RStudio instance with the R version specified in.tool-versions
.However, on macOS, RStudio is opened using the
open
command like so:open -a rstudio
. Doing so ignores the.tool-versions
file, and instead opens an RStudio instance with the system R version as the back-end. I have tried specifying theRSTUDIO_WHICH_R
environmental variable like so:open -a rstudio --env RSTUDIO_WHICH_R=$HOME/.asdf/shims/R
But then I get the following error:
Unable to find R_HOME_DIR in $HOME/.asdf/shims/R
I tried to set the
R_HOME_DIR
environmental variable to the respective asdf installation:open -a rstudio --env RSTUDIO_WHICH_R=$HOME/.asdf/shims/R --env R_HOME_DIR=$HOME/.asdf/installs/R/<version>/lib/R
But this returns the same error as above. I am not quite sure why it works without any problems on Linux, but then gives me issues on macOS. I assume it has something to do with differences between the
open
command used on mac versus simply callingrstudio
on Linux.Curious if anyone has run into this issue/has come across a solution?
The text was updated successfully, but these errors were encountered: