How to update Ruby to 1.9.x on Mac?

前端 未结 9 1858
一个人的身影
一个人的身影 2020-12-02 04:15

I have created a new user account on my mac and I am trying to update to the current version of ruby on it (1.9.2) from the snow leopard default of 1.8.7. Can somebody point

相关标签:
9条回答
  • 2020-12-02 05:01

    With brew this is a one-liner:

    (assuming that you have tapped homebrew/versions, which can be done by running brew tap homebrew/versions)

    brew install ruby193
    

    Worked out of the box for me on OS X 10.8.4. Or if you want 2.0, you just brew install ruby

    More generally, brew search ruby shows you the different repos available, and if you want to get really specific you can use brew versions ruby and checkout a specific version instead.

    0 讨论(0)
  • 2020-12-02 05:02

    Dan Benjamin's Hivelogic article Installing Ruby, RubyGems, and Rails on Snow Leopard is the recommended place to go although the article is for 1.8, so here's a Ruby 1.9-specific install on Snow Leopard. Watch out for the 64-bit thing... either go all 64-bit 'fat' (as is - for example - Apache on OS X, which can cause problems with 32-bit libraries) or check any gems you're likely to use to make sure they're okay for 64-bit.

    0 讨论(0)
  • 2020-12-02 05:02

    This command actually works

    \curl -L https://get.rvm.io | bash -s stable --ruby

    0 讨论(0)
提交回复
热议问题