r-lib / rig

The R Installation Manager
MIT License
629 stars 22 forks source link

Cannot launch RStudio with desired R version on Macbook M1 #208

Closed sjmgarnier closed 5 months ago

sjmgarnier commented 9 months ago

I have installed the following versions of R using rig on my Macbook M1.

❯ rig list
* name       version    aliases
------------------------------------------
  4.1-arm64  (R 4.1.3)  
  4.2-arm64  (R 4.2.3)  
* 4.3-arm64  (R 4.3.2)  release
  4.4-arm64  (R 4.4.0)  devel

When I set the default version using rig default, rig rstudio launches RStudio with the default R version (here, release). However, if I specify a non-default version (e.g., rig rstudio 4.1-arm64), RStudio still launches with the default version instead of the specified non-default one.

Moreover (but maybe unrelated), if I specify the version number instead of the name (e.g., 4.1.3 instead of 4.1-arm64), I get an error message: [ERROR] R version 4.1.3 is not installed.

gaborcsardi commented 9 months ago

What's your macOS version? On newer macOS versions open seems to have a bug, and

open --args ... --env ... 

does not work, whereas

open --env ... --args ...

does. :(

Moreover (but maybe unrelated), if I specify the version number instead of the name

That does not work, you need to specify the name currently. It would make sense to allow specifying the version, it you feel strongly about this, please open another issue for it. Thanks!

sjmgarnier commented 9 months ago

@gaborcsardi Indeed, I'm using the very latest version of MacOS (14.2.1).