简体   繁体   中英

RVM Install Ruby without a network connection

I want install a Ruby version trough RVM without hitting the network.

All necessary files are on the machine.

RVM is installed in the $HOME directory of the user.

I have all necessary deb packages are installed.

The Ruby sources are in $HOME/.rvm/archive :

appsse@sandbox-dev:~$ tree -L 1 .rvm/archives/

.rvm/archives/
├── ruby-1.9.3-p374.tar.bz2
├── rubygems-2.2.2.tgz
└── rvm-stable.tgz

My environment variables:

appsse@sandbox-dev:~$ env| grep rvm|sort

OLDPWD=/daten/appsse/.rvm
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/daten/appsse//.rvm/bin
rvm_bin_path=/daten/appsse//.rvm/bin
rvm_path=/daten/appsse//.rvm
rvm_prefix=/daten/appsse
rvm_version=1.25.24 (manual)

How I can install ruby without hitting the network ?

According to rvm documentation

In order to do it offline you should:

  1. Clean default gems: echo "" > ~/.rvm/gemsets/default.gems
  2. Clean global gems: echo "" > ~/.rvm/gemsets/global.gems
  3. Disable automatic dependencies ("requirements") fetching: rvm autolibs read-fail
  4. Install Ruby: rvm install 1.9.3-p374 --rubygems 2.2.2 (this may require sudo password for autolibs)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM