Install, switch, and manage Ruby versions
Ruby Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
.gitignore
README.md
rdk.sh

README.md

rdk

Install, switch, and manage Ruby versions

Requirements

  • Ruby at /usr/local/opt/ruby
    • brew install ruby
  • ruby-build
    • brew install ruby-build

Installation

Clone the project:

$ git clone https://github.com/built-by-robots/rdk.git /usr/local/share/rdk

Add to your ~/.bashrc or ~/.zshrc file:

source /usr/local/share/rdk/rdk.sh

Restart your shell

Commands

  • rdk Enable rdk for the current project directory
  • rubies? List installed Ruby versions
  • ruby? Show current Ruby version
  • ruby! Install current Ruby version
  • gems Use Bundler to install gems into .bundle

Examples

$ rdk

[rdk] Enabled
$ rubies?

[rdk] - 2.2.3
      - 2.3.1
      - 2.3.3
      - 2.3.4
      - 2.3.6
      - 2.4.1
      - 2.4.2
      - 2.4.3
      - 2.5.0
$ ruby?

[rdk] 2.5.1 (not installed)
$ ruby!

ruby-build: use openssl from homebrew
Downloading ruby-2.5.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.bz2
Installing ruby-2.5.1...
ruby-build: use readline from homebrew
Installed ruby-2.5.1 to /usr/local/share/rdk/rubies/2.5.1

[rdk] Installed 2.5.1