有人尝试过在 Ubuntu 中同时从 RVM 和 deb 安装 Ruby 吗?

发布于 2024-12-28 07:43:47 字数 529 浏览 0 评论 0原文

目前,我正在运行的一台机器已将 Ruby 1.8.7 安装为 .deb,并按照本教程安装了 Rails: https://help.ubuntu.com/community/RubyOnRails

我用这台机器开发了几个 Rails 应用程序,并且时不时地我必须对它们进行一些改进。到目前为止,只需进入目录并输入 Rails sRuby script/server 即可测试更改。

现在的问题是:

这台机器将由其他人继承,可能对 Rails 知之甚少,所以我想让一切尽可能简单。但是,当这种情况发生时,我还想继续尝试最新版本,为此我需要使用 RVM。

所以问题是: 如果我保持一切不变,现在我安装 RVM 以及我需要的 Ruby 版本和 gem。一切都会像现在一样吗?或者我可能会发现一些令人讨厌的惊喜?

也许这个问题还有另一种解决方案。这些也很受欢迎。

Currently one of the machines on which I'm running has Ruby 1.8.7 installed as a .deb and Rails installed following this tutorial: https://help.ubuntu.com/community/RubyOnRails

I've developed several Rails apps with this machine, and from time to time I have to make little improvements to them. Until now to test the changes using just entering the directory and typing Rails s or Ruby script/server was fine.

Now the problem:

This machine is going to be inherited by someone else, probably with very little knowledge about Rails, so I want to keep everything as simple as possible. But, while this happens, I also want to keep trying the latest versions, and for that I would need to use RVM.

So the question is:
If I keep everything as it is, and now I install RVM along with my needed Ruby versions and gems. Will everything keep working the same as now? Or might I find some nasty surprises?

Maybe there is another solution for this issue. Those are also very welcomed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月如刀 2025-01-04 07:43:47

只要您不通过在 .bash_profile< 中调用 RVM 来激活它/code> 或类似的 RVM 不会执行任何操作,因此,是的,您可以将它放在系统 Ruby 旁边,不会出现任何问题。

只需配置您的 .bash_profile 来加载 RVM 或自行调用 init 即可。

你也可以看看 rbenv

As long as you don't activate RVM by calling it in your .bash_profile or similar RVM won't do anything, so, yes, you can have it next to the system Ruby without problems.

Just configure your .bash_profile to load RVM or call the init yourself.

You could have a look at rbenv too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文