DEV Community

Code Salley
Code Salley

Posted on

Rbenv local and Rbenv Global

Newbies like myself often get confused about the difference between rbenv local and rbenv global,

Rbenv local
Enter fullscreen mode Exit fullscreen mode

As the name describes, changes the ruby version in the .ruby-version. file. stile the global ruby version remains the same.

Rbenv global 
Enter fullscreen mode Exit fullscreen mode

changes the ruby inside the rbenv ruby version file in~/.rbenv/version.

To undo any of these changes, just add the --unset flag to the command

Top comments (1)

Collapse
 
ashraffares profile image
Fares Ashraf

this was super useful to me because I was working on project that required 2.7 ruby version and everytime I need to change the version I change it in local but know thanks to Salley I gonna use the Rbenv global.