Installing Ruby offline using rvm

半腔热情 提交于 2019-12-21 05:16:15

问题


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...


回答1:


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.



来源:https://stackoverflow.com/questions/5919591/installing-ruby-offline-using-rvm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!