tagchg
Last Updated: February 25, 2016
·
739
· sheerun
Photo on 08.01.2013 at 04.15

Force specific ruby version for any command.

I had problem with git-upgem: this command works only for ruby 1.9.3 whereas my project still runs on 1.8.7. I use rbenv for ruby version management.

The solution is to define an alias that forces specific ruby version:

alias up='RBENV_VERSION=1.9.3-p362 git up'

From now on, it doesn't matter from where you run up command.

Say Thanks
Respond