rvm as a command-line tool, can provide a lot of convenience, is an inaccessible tool, you need to install Ruby before installing rvm, the following small series will take Ubuntu 11.04 as an example, to introduce Ubuntu 11.04 to install Ruby and rvm Way, let's learn together.
What is rvm?
The full name of rvm is Ruby Version Manager, a command-line tool developed by Wayne E. Seguin. Rvm makes it easy to install and manage the ruby productivity environment, such as different versions of interpreters and gems.
Installing rvm
We will only discuss single-user installation here, that is, install rvm into the user's home folder. At the same time, our environment is Ubuntu 11.04.
rvm needs to download a setup script via the curl tool to install it. At the same time, the downloaded script also needs to use git to download the source from GitHub. Therefore, users who do not have curl and git installed need to execute the following command:
sudo apt-get install curl git
Everything is available, download and execute the installation script via curl (please do not use Root execution):
$ bash "(curl -s https://rvm.beginrescueend.com/install/rvm)
After you finish, you can see a lot of information. Describe how to proceed with the installation. In previous versions of the installation, you had to add configuration information to the ~/.bashrc file yourself, but now the installation script intelligently completes this step for you. You can refer to the setup_user_profiles() function in ~.rvm/src/rvm/scripts/funcionts/installer.
But it's a good idea to check if your .bashrc has the following configuration information:
[[ -s “$HOME/.rvm/scripts/rvm” ]] && Source “$HOME/.rvm/scripts/rvm” # Load RVM into a shell session *as a function*
Reopen the terminal (so let him reload the .bashrc file) and confirm that rvm is already installed. :
$ rvm -v
rvm 1.6.25 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/]
rvm is here and the installation is complete.
Installing Ruby
Before installing ruby, you need to install some necessary dependencies:
$ sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git -core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev
Then readline, before you manually compile This step:
$ rvm pkg install readline
Install ruby-1.9.2-p290, of course, you can also install the version you need, rvm will automatically download and compile for you: < Br>
$ rvm install 1.9.2-p290 --with-readline-dir=$rvm_path/usr
View the installed ruby environment:
View already installed Ruby environment:
$ rvm list
rvm rubies
ruby-1.9.2-p290 [ i386 ]
will be installed ruby-1.9. 2-p290 is set to the default working environment:
$ rvm --default use 1.9.2-p290
Ubuntu 11.04 installation method is Ruby and rvm introduced, rvm tool you can download from the official website, can find their own online resources, you need to install Ruby.
If you are using a cloud server, the website will not open, so most of the vps port
Most of the current notebooks are already dual graphics cards, discrete graphics and integrated grap
In the operation of Linux system, for the security of the system, the password of the root account i
After Kali Linux is installed, many people dont know how to configure the network.
Using cgroups to manage Linux disk io method
Linux installation vagrant process encountered problems
How to install Autossh on Linux system
How to install the whois command on the CentOS system
The difference between Linux and Windows systems
Linux method to modify the PATH path summary
What if CentOS fails to mount Glusterfs?
Linux change 22 port method summary
Fedora 21 upgrade Fedora 22 method
After the Linux boot, the terminal prompts -bash-2.05b$ What should I do?
Detailed explanation of Linux commands find
How to set auto7 automatic shutdown
Sharing English XP operating system Chinese characters garbled problem
Experience windows 7 "sometimes silent and sound" Cheats
How to install Office2016 in Win10 system? Win10 install Office2016 tutorial
I am not here, please shut down automatically!
Win2000 improves anti-DDOS attack ability by modifying the registry
How to install JDK with ylmf OS
How to backup the hardware configuration file to solve the startup failure