Install Ruby for the entire system with RBENV (available to all users)

Source: Internet
Author: User

Rbenv is very useful, but with a small problem, each user needs to install and set up the version separately. The following installation steps can be installed under/usr/local/rbenv, and all users can share rbenv.   #rbenv安装 (/usr/local/rbenv) #安装依赖, requires root user yum install -y gityum install -y  readline-develyum install -y openssl-devel zlib-develyum install -y  postgresql-devel# Turn off SSL authentication, if the clone reports a CA error, perform the following #git config --global http.sslverify falsegit  clone https://github.com/sstephenson/rbenv.git /usr/local/rbenvecho ' Export RBENV_ROOT=/usr/ Local/rbenv ' >/etc/profile.d/rbenv.shecho  ' export path= ' $RBENV _root/bin: $PATH "' >/etc/profile.d/ rbenv.shecho  ' eval  "$ (rbenv init -)" >>/etc/profile.d/rbenv.shgit clone  https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build# Reload Profilesource ~/. bash_profile# View available Ruby version rbenv install --list# install a version Rbenv install 2.1.5rbenv global  2.1.5# using domestic gem source gem sources--remove Https://rubygems.org/gem Sources-a http://ruby.sdutlinux.org/gem Sources-lgem Install Bundle-v

Use rbenv to install Ruby for the entire system (available to all users)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.