How does MacPorts install packages? How can I activate a Ruby installation done via MacPorts?

后端 未结 4 1464
一向
一向 2020-12-29 17:03

After trying to install ruby19 on my machine (PPC, Mac OSX 10.5.7) using the following commandline

sudo port install ruby19

the version of

4条回答
  •  失恋的感觉
    2020-12-29 17:09

    By default, the Ruby 1.9 port in MacPorts installs the Ruby binary in /opt/local/bin/ruby1.9. It appends a 1.9 to avoid stomping on Ruby 1.8.7 libraries and gems, since not all gems are compatible with 1.9 yet. So you have to launch Ruby 1.9 with ruby1.9 (and irb1.9, etc.)

    If you don't want to have to do this, you have two options:

    1. Alias ruby to ruby1.9 in your shell config file.
    2. Install the Ruby 1.9 port with the +nosuffix variant. Be warned, however, that if you have installed Ruby 1.8 via MacPorts, installing Ruby 1.9 via MacPorts without the 1.9 suffix may cause conflicts (with gems, etc.).

提交回复
热议问题