Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RVM offline page is missing some instructions #4672

Closed
npras opened this issue Apr 20, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@npras
Copy link

commented Apr 20, 2019

Description

https://rvm.io/rvm/offline has instructions to download rvm and ruby binaries and then install them.

But following them I noticed 2 issues.

The rvm install command mentioned in this section https://rvm.io/rvm/offline#installing-ruby doesn't read the binaries from the $rvm_path/archives/ path. It's downloading from the internet from the internet.

So instead of this I used rvm mount $rvm_path/archives/ruby-2.2.0.tar.bz2.

This too fails. It wasn't able to find the bin/ruby file, and so complained “missing ruby”.

But then, I accidentally found the fix when I installed ruby using rvm install again. I noticed that there's a new file in the $rvm_path/archives/ folder apart from the files I'd put there already (ruby-2.2.0.tar.bz2, rubygems-2.4.6.tgz, yaml-0.1.6.tar.gz and the bundler gem). The new file is - bin-ruby-2.2.0.tar.bz2.

Now, if I delete the installed ruby (by deleting the whole /usr/local/rvm folder) and then re-run the offline script which now uses the rvm mount command mentioned above to install the ruby, it works! It now doesn't download from the internet. It just reads the files from the archives folder and installs them, and everything works.

(Even now, during the '#setup' phase, I saw an error "Missing 'ruby' in 'rubygems_detect_ruby_lib_gem_path'". I can't find a fix for this, but despite this, the correct ruby and rubygems versions will be installed and everything works.)

Could someone please let me know if I'm missing anything or if the documentation is incorrect and can be updated?

Environment info

We run the server setup script as root. And so rvm gets installed in /usr/local/rvm. So, I've modified our code accordingly as it differs from the assumption made in the rvm offline page.

We were trying to install ruby 2.2.6. The version mentioned above 2.2.0 is just for demo.

I've followed every other steps mentioned in the offline page (eg: rvm autolibs read-fail and also ran rvm requirements to find the required packages beforehand and then installed them first before running this rvm/ruby setup script).

(And thanks a lot for making this awesome piece of software!).

@bparanj

This comment has been minimized.

Copy link

commented May 9, 2019

You don't need any of the workarounds you have in your blog post. It is a lot simpler. I got it working by running:

rvm --verify-downloads 2 --disable-binary install 2.4.5 --rubygems 3.0.3

to successfully install ruby offline. Reference: http://uberether.com/2014/installing-ruby-version-manager-in-offline-mode/

@npras

This comment has been minimized.

Copy link
Author

commented May 10, 2019

@bparanj Thanks for this info. Didn't know about both the options --verify-downloads 2 and --disable-binary.

I'll try this the next time.

Will close the issue.

@npras npras closed this May 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.