SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Sunday, July 7, 2013

Switching the ruby version with rbenv

Steps to switch the ruby version

  1. $ rbenv versions 
            List all ruby versions known to rbenv, asterick represents the current version
            1.9.3-p0
            1.9.3-p385
            * 2.0.0-rc2 (set by /home/jude/.ruby-version)
            ruby-1.9.3-p385

    2.   $ rbenv local 1.9.3-p385
             Sets the specified ruby version locally
    
    3.  $ rbenv global 1.9.3-p385
            Sets the specified ruby version globally

Also check that you have the following in your ~/.bash_profile or ~/.bashrc if using bash 

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

NOTE: Make sure it's the last setting in your ~/.bash_profile . I ran into an issue where I installed a program that updated my .bash_profile and reset PATH.

No comments :

Post a Comment