使用rvm脱机安装Ruby [英] Installing Ruby offline using rvm

查看:88
本文介绍了使用rvm脱机安装Ruby的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用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...

推荐答案

我遇到了类似的问题,我想将红宝石版本和所有关联的宝石部署到生产机器上...

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

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

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.

一个重要的陷阱:

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

我注意到,RVM的内部簿记功能可在安装Ruby版本和gems期间跟踪某些环境变量,并且它尤其可以跟踪所使用的用户帐户的名称以及到该帐户的路径.用户的主目录.为什么我不使用在所有UNIX上都是标准的$ HOME和$ USER困扰我.对于我来说,这似乎是RVM中的一个真正的错误.

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.

这篇关于使用rvm脱机安装Ruby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆