rvm
rvm copied to clipboard
RVM does not use default ruby version on a new terminal session
Description
I'm using Ubuntu 18.04.3 LTS. I have two installed ruby versions 2.6.3 and 2.2.6. I have set 2.2.6 to be used by default using 'rvm use 2.2.6 --default' but whenever I load a new terminal session, rvm starts using 2.6.3. Running 'rvm list' shows that 2.2.6 is the default ruby but its not being used. I have tried searching everywhere, tried all the fixes suggested but still no luck. I have to explicitly use 2.2.6 whenever I want it. I have also enabled 'Run command as a login shell'. Please help!
Steps to reproduce
- rvm use 2.2.6 --default
- start a new terminal session
- rvm list, shows that 2.2.6 is default but not being automatically used
Expected
running rvm use 2.2.6 --default, should automatically use 2.2.6 in new terminal sessions.
Actual Behaviour
rvm use 2.2.6 --default, does set default version but its not being used on new terminal sessions.
Hi, I face exactly the same issue. Did you find a solution to it? Thanks.
Hi, I face exactly the same issue. Did you find a solution to it? Thanks.
I wasted a lot of time trying different things but couldn't find anything. I just implemented by own workaround by automatically running following command everytime I start my bash.
rvm use default &> /dev/null
I did the same but I hoped for a clear solution...Thanks!
On Mon, Jan 13, 2020 at 6:43 PM Aurangzaib Danial Liaqat Khan < [email protected]> wrote:
Hi, I face exactly the same issue. Did you find a solution to it? Thanks.
I wasted a lot of time trying different things but couldn't find anything. I just implemented by own workaround by automatically running following command everytime I start my bash. rvm use default &> /dev/null
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rvm/rvm/issues/4833?email_source=notifications&email_token=AIZHLR4X2FIOADSTJWG2IJDQ5SK2FA5CNFSM4J6KNWBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIZNMAI#issuecomment-573756929, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIZHLR6KHWGY2Q4AJXNJS6TQ5SK2FANCNFSM4J6KNWBA .
same issue!!!
Same issue, when you open a new terminal default version isn't guaranteed to be the version that is used.
Hello, can someone test if restarting the system updates the default version loaded?
After I set a new default using rvm --default use 2.7.2 and restart my system, it seems that it is using the correct version when I open new terminals.
Hi,
Is there seriously no solution for this problem (except for a workaround). It's driving me crazy, nothing i've found works. (editing bash_profile, restarting system after setting default, etc.
Hi,
I've found that I have corrected bash_profile instead of bashrc
Just added this line to it: https://stackoverflow.com/questions/4911504/rvm-installed-by-ruby-not-working
https://stackoverflow.com/questions/4911504/rvm-installed-by-ruby-not-working
I have exact same issue. I set the default version to ruby-2.7.4 and the next time and run terminal it is switched back to ruby-2.6.4
I'm also having this issue with RVM v1.29.12.
As suggested by @aurangzaib-danial, adding rvm use default &> /dev/null to the end of my ~/.zshrc works for now.
I had the same problem, this solved it:
rvm alias create default 3.2.1
(Replace 3.2.1 with the version of Ruby that you wish to use)
In my case, the command rvm use default did nothing, and when I deleted my other ruby which was unchangeably the default, RVM reverted to using system ruby by default!
- In your terminal run
code ~/.zshrc - Add to the bottom of the file:
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* - Update the
.ruby-versionfile in your project directory to match the default - Open new terminal and run
ruby -v