Skip to content

Instantly share code, notes, and snippets.

@Dangeranger
Last active May 31, 2019 19:14
Show Gist options
  • Save Dangeranger/fda22b1cb6187f7ee1427712f2b0a638 to your computer and use it in GitHub Desktop.
Save Dangeranger/fda22b1cb6187f7ee1427712f2b0a638 to your computer and use it in GitHub Desktop.
Installation and setup of Rbenv and Ruby on Linux systems

Ruby Installation on Linux via Rbenv

Prerequisites

Make sure that you have the required build tools for Ruby.

sudo apt-get install autoconf automake bison build-essential curl \
 git-core libapr1 libaprutil1 libc6-dev libltdl-dev libreadline6  \
 libreadline6-dev libsqlite3-0 libsqlite3-dev libssl-dev libtool  \
 libxml2-dev libxslt-dev libxslt1-dev libyaml-dev ncurses-dev     \
 nodejs openssl sqlite3 zlib1g zlib1g-dev

Install Git for Linux

sudo apt-get install git

For more detailed instruction on installation see the following:

Visit the Rbenv Github page and see the rbenv install instructions

Rbenv Installation Summary

Use the curl command in the installation page:

curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash

You can see the shell script that will be run at the following URL:

Run the rbenv-doctor script to check your installation

curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash

You can see the shell script that will be run at the following URL:

Run the Configuration Init

# make sure that the Bash configuration file exists
touch ~/.bashrc
# Add the Rbenv executable at the front of your PATH
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
# Run the Rbenv init script and follow the instructions
~/.rbenv/bin/rbenv init
# Start a new instance of the Bash process to source your new configuration
exec bash

At this point you are ready to install a Ruby version.

Install Ruby

List the known Ruby versions

# All ruby versions known to the ruby-build plugin
rbenv install -l
  • Latest Ruby as of this document is 2.5.5

Install Latest Ruby

rbenv install 2.5.5

Set Ruby 2.5.5 to the default version

rbenv global 2.5.5

Install Bundler

gem install bundler

Project Setup

Navigate to CodeLikeThis repository in your filesystem

cd ~/path/to/codelikethis

Install gems associated with the Project

bundle install

Install the ‘deckrb’ gem

gem install deckrb

Install the ‘rake’ gem

gem install rake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment