When I open terminal then enter to the rails application, the rvm will load the gemset in .ruby-gemset
file as the following:
> cd my_application/
> rvm gemset list
The output as the following:
gemsets for ruby-2.2.2 (found in /home/yakout/.rvm/gems/ruby-2.2.2)
(default)
=> my_gemset
global
Then I open new tab in terminal, and run rvm gemset list
, the output will be:
gemsets for ruby-2.2.1 (found in /home/yakout/.rvm/gems/ruby-2.2.1)
=> (default)
global
I put the following line in .profile
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*
And I put the following lines in .bash_profile
file:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
And I put the following line in .bashrc
file:
PATH=$PATH:$HOME/.rvm/bin
And I changed the preferences of my terminal by: Edit
-> Preferences
-> Title and Command
tab -> Run command as a login shell
.
How can I make rvm
load the current gemset when I open new tab in terminal ?
There is a workaround to get the right gemset when you open a new tab. Add this line at the end of your ~/.profile
cd .
I got this from https://github.com/rvm/rvm/issues/2527
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With