Untitled

 avatar
unknown
sh
2 years ago
811 B
5
Indexable
# Ubuntu setup for Ruby

# Install basics 

sudo apt-get -y install \
    git \
    ca-certificates \
    curl \
    gnupg \
    build-essential \
    lsb_release \
    libz-dev \
    libssl-dev \
    zsh && \
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

# Install rbenv, adds to zshrc, install ruby-build

git clone https://github.com/rbenv/rbenv.git ~/.rbenv && \
    echo 'eval "$(~/.rbenv/bin/rbenv init - zsh)"' >> ~/.zshrc && \
    source ~/.zshrc && \
    git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build && \
    rbenv install 3.1.2

## Optional extra setup

# Skips downloading documentation alongside gems; greatly speeds up installing time.
echo "gem: --no-document" >> ~/.gemrc
gem install bundler
gem install rails
Editor is loading...