gpt4 book ai didi

ruby-on-rails - 在 OS X 上安装多个版本的 Rails

转载 作者:数据小太阳 更新时间:2023-10-29 07:40:23 24 4
gpt4 key购买 nike

OS X 10.6 默认安装了 Rails 2.2.2。
如何升级到 Rails 2.3.8?

既然 Rails 3 已经发布,是否可以在 OS X 上安装多个版本的 Rails(如 2.3.8 和 3)?
(例如,我可能同时从事两个 Rails 项目,一个是 Rails 2.x,另一个是 Rails 3.x)。

最佳答案

使用rvm

RVM is a command line tool which allows us to easily install, manage and work with multiple ruby environments from interpreters to sets of gems...

RVM allows users to deploy each project with its own completely self-contained and dedicated environment--from the specific version of ruby all the way down to the precise set of required gems to run the application. Having a precise set of gems also avoids the issue of version conflicts between projects, causing difficult-to-trace errors and hours of hair loss. With RVM, NO OTHER GEMS than those required are installed. This makes working with multiple complex applications where each has a long list of gem dependencies efficient. RVM allows us to easily test gem upgrades by switching to a new clean set of gems to test with while leaving our original set intact. It is flexible enough to even have a set of gems per environment or development branch--or even individual developer's taste...

关于ruby-on-rails - 在 OS X 上安装多个版本的 Rails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4442875/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com