Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Install Ruby

ZeroC0D3 Team edited this page Jan 20, 2018 · 1 revision

Installation Ruby

Install Ruby for Ubuntu version 16.04

Setup Installation

  • Create script install_ruby.sh

  • Add this line:

#!/usr/bin/env sh

##### INSTALL RUBY #####
sudo chmod 777 /opt

git clone https://github.com/zeroc0d3/ruby-installation.git /opt/ruby-installation \
  && cd /opt/ruby-installation \
  && mv ~/.bashrc ~/.bashrc_old \
  && mv ~/.zshrc ~/.zshrc_old \
  && cp .zshrc ~/.zshrc \
  && cp .bashrc ~/.bashrc \
  && /bin/sh install_ruby.sh \
  && /bin/sh gems.sh
  • Change executable script
chmod +x install_ruby.sh

Running Installation

sh ./install_ruby.sh

Version Ruby

### Rbenv ###
rbenv install [ruby_verion]  # eg: 2.4.2
rbenv global [ruby_version]
rbenv rehash

### Rvm ###
rvm install [ruby_version]   # eg: 2.4.2
rvm use [ruby_version]
rvm local [ruby_version]

Packages Ruby

gem install bundler
bundle install
Clone this wiki locally