Setup Ubuntu / WSL For Ruby Development

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • rbenv

    Manage your app's Ruby environment

  • # Part One: Install basics # zlib1g-dev might be zlib-dev on Ubuntu 22.04 # lsb-release might be lsb_release on Ubuntu 22.04 sudo apt-get update && sudo apt-get -y install \ git \ ca-certificates \ curl \ gnupg \ build-essential \ lsb-release \ zlib1g-dev \ libssl-dev \ zsh && \ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # Part Two: Installs & sets up rbenv, installs ruby 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 && \ rbenv global 3.1.2 # Part Three: Optional minimum setup for Rails development echo "gem: --no-document" >> ~/.gemrc && \ gem install bundler && \ gem install rails

  • ruby-build

    A tool to download, compile, and install Ruby on Unix-like systems.

  • # Part One: Install basics # zlib1g-dev might be zlib-dev on Ubuntu 22.04 # lsb-release might be lsb_release on Ubuntu 22.04 sudo apt-get update && sudo apt-get -y install \ git \ ca-certificates \ curl \ gnupg \ build-essential \ lsb-release \ zlib1g-dev \ libssl-dev \ zsh && \ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # Part Two: Installs & sets up rbenv, installs ruby 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 && \ rbenv global 3.1.2 # Part Three: Optional minimum setup for Rails development echo "gem: --no-document" >> ~/.gemrc && \ gem install bundler && \ gem install rails

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • ohmyzsh

    🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.

  • Here we're installing not only the base libraries needed to run rbenv & ruby-build (the rbenv plugin that will actually install Ruby), but also ZShell and its famous extension, oh-my-zsh. This offers some nice things such as syntax & branch highlighting, and it is completely optional. If you'd like to keep your bash as it is, just skip this step (however, note you'll have to add rbenv to their bash correspondent instead of zshell init files!).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts