Upgrading Ruby on Mac OS X

后端 未结 5 1405
死守一世寂寞
死守一世寂寞 2021-02-19 00:32

I am reading the book Programming Ruby and am looking to upgrade the version of Ruby on my computer. I run Mac OS X Snow Leopard and doing ruby -v in the command line shows I am

5条回答
  •  一生所求
    2021-02-19 00:53

    As @Andrew Grimm eluded, the problem you are having is likely due to a problem in your $PATH variable. Since macports typically installs stuff in /opt, modifying your $PATH variable to:

    $ export PATH=/opt/local/bin:$PATH
    

    Will most likely help. However, I would urge you to look into RVM as @hvgotcodes recommends.

提交回复
热议问题