I need to install rvm
on a new Ubuntu machine.
I would use rvm
to switch to different ruby versions and gemsets required by different Ruby on Rails applications.
rvm suggests to use the Ubuntu package . However Internet documentation on Rails on Ubuntu, such as at RailsApp , suggests to install rvm using instead the curl command with the --ruby
or --rails
options and the --autolibs=enable
option for avoiding missing libraries:
$ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable
I could not find information specific to the --rails
option, so I do not understand what it does, install only the rails gem or install rails plus other gems useful for the rails environment, like bundler
and json
for instance. There is a bug however: RVM does not install Rails when invoked with curl .
Considering that I do not need the rails gem in the global gemset, supposing that the above bug will soon be fixed, what is in the end the best choice for installing rvm in Ubuntu: the Ubuntu package or the curl command with the (hopefully explained) --rails
option plus the --autolibs=enable
option?
It depends on your Ubuntu Version.
lsb_release -a
Then you can search for the instructions based on your Ubuntu Release. For example I am using Linux Mint
based on Ubuntu Xenial 16
. Ubuntu uses the apt
package manager to install packages
To find packages type in your terminal
apt search rvm
it will return a list of packages. To learn more about apt
use:
apt --help
apt <command> --help
man apt
To install RVM you need to always reference their official webpage or github page
For ubuntu RVM has an official Ubuntu Page which give you the following instructions:
https://github.com/rvm/ubuntu_rvm
Follow those instructions
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.