开发者

update ruby to 1.8.7

I'm working on a project that i have to use ruby 1.8.7. I'm using today, ruby 1.8.6 + Mac OSX Darwin. This ruby 1.8.6 was installed with the OS, it's a developer package from Apple. My question is: how can i update this 开发者_运维问答package? if i run ports, it dont find my current installed package and install a new ruby version, with different paths and as effect it breaks my rubygems (i know how to fix it, but it is always workarounds over workarounds).

There is a clean way to update the default ruby that comes with the OS or its better to remove it and just manage it by Port? Please answer like this one How to update to Ruby 1.8.7 don't helps me


Have you tried rvm gem? It manages Ruby versions installed, allow to compile most (if not all) actual (and archival) Ruby versions, sets proper environment variables pointing to actually used ruby version.

$ gem install rvm
$ rvm install 1.8.7
$ rvm use 1.8.7 --default


On my OS X machines I have several versions of Ruby installed.

I install then, from source, under /usr/local/ruby-1.X.X

Once you have multiple versions of Ruby installed you will need your environment to know which one to use.

I do this by setting the PATH, like so

export PATH="/usr/local/ruby-1.8.7/bin:$PATH";

See Hive Logic's article on installing Ruby

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜