How to tell Terminal to use newly downloaded Ruby 1.9.2 instead of original 1.8.7?

Discussion in 'Mac Programming' started by SBR210, Sep 13, 2010.

  1. SBR210 macrumors newbie

    Sep 13, 2010
    I've already compiled and installed Ruby 1.9.2 but I don't know how to get the Terminal to use the new version instead of the factory installed 1.8.7 that came on my Snow Leopard machine. Can anyone help me out with the right commands to use to set the default?

  2. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Put the path to the newly installed version of Ruby before the path to the old version of Ruby in your PATH.
  3. SBR210 thread starter macrumors newbie

    Sep 13, 2010
    Thanks very much. As a complete newbie, would you be able to tell me specifically how to do that? I also need to add another new directory I created for Ruby files to the PATH as well. I've been looking on google and tried using the instructions here ( twice but they didn't work for me. Thank again for the help, really appreciate it.
  4. mdatwood macrumors 6502a

    Mar 14, 2010
    Denver, CO
    Get RVM. It's easy to setup and will manage multiple Ruby versions and allow you to switch between them with a simple CLI command.

Share This Page