使用rvm离线安装Ruby

发布于 2024-11-05 07:40:53 字数 166 浏览 6 评论 0原文

我需要使用 rvm 在离线计算机中安装 Ruby-1.9.2。我尝试将 ruby​​-1.9.2-p180.tar.gz 复制到 ./rvm/archives 并运行 rvm install ruby​​-1.9.2。但 rvm 仍然尝试从 ftp.ruby-lang.org 下载 Ruby”。非常感谢任何建议...

I need to install Ruby-1.9.2 in an offline machine using rvm. I tried by copying ruby-1.9.2-p180.tar.gz in to ./rvm/archives and running rvm install ruby-1.9.2. But still rvm is trying to download Ruby from ftp.ruby-lang.org'. Any advice is greatly appreciated...

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

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

发布评论

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

评论(1

岛歌少女 2024-11-12 07:40:53

我遇到了类似的问题,我想将 ruby​​ 版本和所有关联的 gem 部署到生产计算机...

我强烈建议您使用“rsync”或“scp -rp”来复制完整的子目录~/.rvm 到目标计算机 如果该计算机完全脱机,您当然可以使用“cp -rp”将该目录复制到闪存驱动器,然后将其复制到非联网计算机

。重要问题:

请确保如果您复制 .rvm 目录,您将在所有计算机上使用同名的用户帐户!

我注意到 RVM 的内部簿记在安装 Ruby 版本和 gem 期间会跟踪一些环境变量,并且它特别跟踪所使用的用户帐户的名称,以及用户主目录的路径,这让我明白为什么他们不使用 $HOME 和 $USER ,它们是所有 UNIX 上的标准......似乎是真实的。对我来说,RVM 存在 bug。

如果您对所有计算机使用相同的用户帐户,则它会正常工作。

I had a similar problem, where I want to deploy the ruby version and all associated gems to the production machines...

I would highly recommend that you use either "rsync' or 'scp -rp' to copy the complete subdirectory ~/.rvm to the target machine. If that machine is completely offline, you could of course copy that directory with 'cp -rp' to a flash-drive and then copy it to the non-networked machine.

One important Gotcha:

be sure that you use the identically named user account on all machines, if you replicate the .rvm directory!

I noticed that the internal book-keeping of RVM keeps track of some environment variables during installation of Ruby versions and gems, and that it keeps track in particular of the name of the user account that was used, and the path to the users's home directory. Beats me why they don't use $HOME and $USER , which are standard on all UNIXes.. seems like a real bug in RVM to me.

if you use the same user account for all machines, it will work just fine.

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