0

I have RVM installed, with project rvmrc files enabled.

In my bashrc I have:

rvm use 1.9.2

However, in one of my project rvmrc files I have:

rvm use 1.8.7

Which works great, however if I open up a new terminal window within the project I get:

Using /home/.../.rvm/gems/ruby-1.8.7-p352
Using /home/.../.rvm/gems/ruby-1.9.2-p290

Obviously, I want to 1.8.7, but the bashrc gets run after the project rvmrc. Meaning I'm using the wrong rvm so either have to cd out and back into the directory or run rvm use 1.8.7 again.

Is there anyway to force the rvmrc file to run after the bashrc?

I know about rvm default, but not sure if I want to\can use this.

Yule
  • 9,668
  • 3
  • 51
  • 72

1 Answers1

1

please read this: https://rvm.beginrescueend.com/support/faq/#shell_login it describes which files should be used in which use cases.

as for rvm --default 1.9.2 it should be used over manually entering version into your rc file as it is loading ruby only if one was not yet selected.

Simplest solution for your rc files problem (I guess you have one) would be rvm get head --auto which will reorganize sourcing rvm in your rc files - to make it fully functional you need to restart your graphical session (or just reboot computer).

mpapis
  • 52,729
  • 14
  • 121
  • 158