|
Rvm is a command line tool that can provide a more convenient version of ruby environmental management and switching. If you intend to learn ruby / rails, rvm is one of the essential tools.
All commands are here and then the next user privileges operation.
Installation rvm:
sudo apt-get install curl
sudo apt-get install git-core
sudo apt-get install libssl-dev (otherwise gem can not be used)
sudo apt-get install libxslt-dev libxml2-dev (otherwise bundle install will go wrong)
sudo apt-get install libmysql-ruby libmysqlclient-dev (for mysql)
sudo apt-get install libsqlite3-dev (for sqlite)
sudo apt-get install zlib1g-dev (or can not create a project)
sudo apt-get install nodejs (certain or else will be reported ExecJS :: RuntimeError in Welcome # index error)
sudo apt-get install g ++ (installation thin, eventmachine the class time will be used)
curl -L get.rvm.io | bash -s stable (to download and install rvm)
source ~ / .bashrc
source ~ / .bash_profile
sed -i -e 's / ftp \ .ruby-lang \ .org \ / pub \ / ruby / ruby \ .taobao \ .org \ / mirrors \ / ruby / g' ~ / .rvm / config / db (Modify RVM Ruby installation source to domestic Taobao mirror server, which can improve the speed of installation)
ruby installation and handover
rvm list known (listed known ruby version)
rvm install 1.9.3 (install a ruby version 1.9.3 here to install the latest, rvm list known list which can be used to install)
rvm use 1.9.3 (using a ruby version, if you want to set as the default version, you can use rvm use 1.9.3 --default)
rvm list (query already installed ruby)
rvm remove 1.9.2 (uninstall a version already installed) |
|
|
|