Setting ruby executable path

Bob's Avatar


05 Aug, 2010 06:46 PM

How do i change the ruby executable path?

  1. Support Staff 1 Posted by Eric Hodel on 05 Aug, 2010 06:50 PM

    Eric Hodel's Avatar

    Install ruby in a different location.

  2. 2 Posted by ron on 11 Aug, 2010 04:35 PM

    ron's Avatar

    That does not answer the question. When you have multiple versions of ruby installed (such as debian/ubuntu's one and one compiled from source), how do I tell gem to use my newly compiled ruby instead of my distributiion's version?

  3. Support Staff 3 Posted by Eric Hodel on 11 Aug, 2010 08:14 PM

    Eric Hodel's Avatar

    Set your PATH env var to prefer your newly compiled ruby or use a complete path to the newly installed ruby's gem. gem is installed alongside the ruby it was installed with (/usr/local/bin/ruby will have /usr/local/bin/gem after installing RubyGems).

    PS: I did answer the question you asked. If you want to know how to do a specific thing you will need to ask a specific question. We can't read your mind through the internet

  4. 4 Posted by ron on 12 Aug, 2010 08:37 AM

    ron's Avatar

    Thanks for your reply.
    I found the cause of my confusion: I complied ruby but I did not compile gem, thus the system picked up my OS's version of gem. Thus my PATH was correct without leading to the expected result.

    Anyway, I also found a great solution to all version issues: RVM ( Takes a little bickering to install and understand at first, but will save you tons of trouble later.

  5. Eric Hodel closed this discussion on 12 Aug, 2010 05:40 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac