Question

I have a new install of RVM on Fedora 20.

If I cd to myapp, RVM will read the .ruby-gemset file and switch to the appropriate gemset, but if I open a new tab (control-shift-t) and run rvm gemset list I find that it's using the default gemset.

Does any have any idea what I might be doing wrong?

I've got the following in .bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

PATH=$PATH:$HOME/.local/bin:$HOME/bin:$HOME/.rvm/bin

export PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

And I've got more ore less identical content in .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

PATH=$PATH:$HOME/.local/bin:$HOME/bin:$HOME/.rvm/bin

export PATH

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

The terminal is the bog standard one that comes with Fedora.

Was it helpful?

Solution 2

I had the same issue, and I was able to fix it. However, my exact solution might be useless for you. I had oh-my-zsh installed. It looks like during installation, it was trying to mimic my .bashrc files and it screwed PATH variable for me. Here's the line I had trouble with:

export PATH="/home/alexander/.rvm/gems/ruby-2.1.1@security/bin:/home/alexander/.rvm/gems/ruby-2.1.1@global/bin:/home/alexander/.rvm/rubies/ruby-2.1.1/bin:/home/alexander/.nvm/v0.10.25/bin:/home/alexander/work/gc-sdk/google-cloud-sdk/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/alexander/.rvm/bin"

So, you need to verify if your PATH variable isn't tempered with. And you need to let RVM configure it for you. Both these things can be done with a simple command in your terminal (assuming you have RVM installed):

rvm get stable --auto-dotfiles

Also, there're couple of issues created on GitHub. The common advice is to use command from above and switch your terminal to login shell.

Hope it helps!

OTHER TIPS

Putting cd . to ~/.profile fixed the issue for me.

If you are using zsh, put cd . to ~/.zlogin.

Go to: Preferences(Locate it by clicking bars at the Top-Right immediately after the search icon) -> Choose Your Profile(Located left at the bottom) If you don't have a profile then you can add a new one by clicking the plus icon that precedes the name profiles -> Click on 'Command'(Located at the top) -> Check by clicking the checkbox that states, 'Run command as a login shell'

That worked for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top