Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set rvm default interpreter in user's .rvmrc?

Tags:

ruby

rvm

I'm curious if it's possible to set my default Ruby interpreter within my $HOME/.rvmrc file (i.e. the equivalent of a rvm --default use 1.9.2).

I tried setting rvm_ruby_interpreter and rvm_ruby_version, but no luck.

like image 651
Abe Voelker Avatar asked Jul 01 '11 01:07

Abe Voelker


1 Answers

Just cleaning out my unanswered questions... I ended up basically taking Phrogz's suggestion and adding this to my .zprofile:

RVM_DEFAULT=ruby-1.9.3-p194@home
if [ -x ~/.rvm/bin/rvm-prompt ] && [ "$(~/.rvm/bin/rvm-prompt)" != $RVM_DEFAULT ] ; then
  rvm use $RVM_DEFAULT
fi

Looking back it's kind of a weird question, probably due to the fact that I was new to rvm and relatively new to Ruby (but familiar with Unix and dotfiles).

like image 158
Abe Voelker Avatar answered Sep 19 '22 01:09

Abe Voelker