Skip to content
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

Open
Nathaniel-Haines opened this issue Sep 30, 2021 · 1 comment
Open

Integrating with RStudio for macOS #7

Nathaniel-Haines opened this issue Sep 30, 2021 · 1 comment
Labels
help wanted Extra attention is needed mac Issues happening on Mac Os

Comments

@Nathaniel-Haines
Copy link

Nathaniel-Haines commented Sep 30, 2021

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 running rstudio 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 the RSTUDIO_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 calling rstudio on Linux.

Curious if anyone has run into this issue/has come across a solution?

@taiar taiar added help wanted Extra attention is needed mac Issues happening on Mac Os labels Aug 2, 2022
@shepherdjerred
Copy link

I was able to run RStudio with this command:

open -a studio --env RSTUDIO_WHICH_R=$HOME/.asdf/installs/R/4.2.1/bin/R

RStudio opens, but is then unable to find a .dylib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed mac Issues happening on Mac Os
Development

No branches or pull requests

3 participants