• Stars
    star
    1,907
  • Rank 24,318 (Top 0.5 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 11 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Installs Ruby, JRuby, TruffleRuby, or mruby

ruby-install

Installs Ruby, JRuby, TruffleRuby (native / GraalVM), or mruby.

Features

  • Supports installing arbitrary versions.
  • Supports downloading the latest versions and checksums from ruby-versions.
  • Supports installing into /opt/rubies/ for root and ~/.rubies/ for users by default.
  • Supports installing into arbitrary directories.
  • Supports downloading from arbitrary URLs.
  • Supports downloading from mirrors.
  • Supports downloading/applying patches.
  • Supports specifying arbitrary ./configure options.
  • Supports downloading archives using wget or curl.
  • Supports verifying downloaded archives via MD5, SHA1, SHA256 or SHA512 checksums.
  • Supports installing build dependencies via the package manager:
  • Has tests.

Anti-Features

  • Does not require updating every time a new Ruby version comes out.
  • Does not require recipes for each individual Ruby version or configuration.
  • Does not support installing trunk/HEAD or nightly rolling releases.
  • Does not support installing unsupported/unmaintained versions of Ruby.

Requirements

  • bash >= 3.x
  • grep
  • wget > 1.12 or curl
  • md5sum or md5
  • sha1sum or sha1
  • sha256sum or sha256
  • sha512sum or sha512
  • tar
  • bzip2
  • xz
  • patch (if --patch is specified)
  • gcc >= 4.2 or clang

Synopsis

List supported Rubies and their current stable versions:

$ ruby-install

Updates then list the supported Rubies and their current stable versions:

$ ruby-install --update

Install the current stable version of Ruby:

$ ruby-install ruby

Install the latest version of Ruby:

$ ruby-install --update ruby

Install a stable version of Ruby:

$ ruby-install ruby 3.1

Install a specific version of Ruby:

$ ruby-install ruby 3.1.2

Install a Ruby into a specific directory:

$ ruby-install --install-dir /path/to/dir ruby

Install a Ruby into a specific rubies directory:

$ ruby-install --rubies-dir /path/to/rubies/ ruby

Install a Ruby into /usr/local:

$ ruby-install --system ruby 3.1.2

Install a Ruby from an official site with directly download:

$ ruby-install -M https://ftp.ruby-lang.org/pub/ruby ruby 3.1.2

Install a Ruby from a mirror:

$ ruby-install -M http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby ruby 3.1.2

Install a Ruby with a specific patch:

$ ruby-install -p https://raw.github.com/gist/4136373/falcon-gc.diff ruby 1.9.3-p551

Install a Ruby with a specific C compiler:

$ ruby-install ruby 3.1.2 -- CC=clang

Install a Ruby with specific configuration:

$ ruby-install ruby 3.1.2 -- --enable-shared --enable-dtrace CFLAGS="-O3"

Install a Ruby without installing dependencies first:

$ ruby-install --no-install-deps ruby 3.1.2

Uninstall a Ruby version:

$ rm -rf ~/.rubies/ruby-3.1.2

Integration

Using ruby-install with RVM:

$ ruby-install --rubies-dir ~/.rvm/rubies ruby-3.2.0-preview3

Using ruby-install with rbenv:

$ ruby-install --install-dir ~/.rbenv/versions/3.2.0-preview3 ruby-3.2.0-preview3

ruby-install can even be used with Chef.

Install

wget https://github.com/postmodern/ruby-install/releases/download/v0.9.3/ruby-install-0.9.3.tar.gz
tar -xzvf ruby-install-0.9.3.tar.gz
cd ruby-install-0.9.3/
sudo make install

PGP

All releases are PGP signed for security. Instructions on how to import my PGP key can be found on my blog. To verify that a release was not tampered with:

wget https://github.com/postmodern/ruby-install/releases/download/v0.9.3/ruby-install-0.9.3.tar.gz.asc
gpg --verify ruby-install-0.9.3.tar.gz.asc ruby-install-0.9.3.tar.gz

Homebrew

ruby-install can also be installed with homebrew:

brew install ruby-install

Or the absolute latest ruby-install can be installed from source:

brew install ruby-install --HEAD

Arch Linux

ruby-install is already included in the AUR:

yaourt -S ruby-install

Fedora Linux

ruby-install is available on Fedora Copr.

FreeBSD

ruby-install is included in the official FreeBSD ports collection:

cd /usr/ports/devel/ruby-install/ && make install clean

Known Issues

Please see the wiki.

Alternatives

Endorsements

I like the approach you're taking. Curious to see how it plays out.

-- Sam Stephenson of rbenv

More Repositories

1

chruby

Changes the current Ruby
Shell
2,867
star
2

spidr

A versatile Ruby web spidering library that can spider a site, multiple domains, certain links or infinitely. Spidr is designed to be fast and easy to use.
Ruby
763
star
3

ruby-nmap

A Ruby interface to nmap, the exploration tool and security / port scanner. Allows automating nmap and parsing nmap XML files.
Ruby
295
star
4

command_kit.rb

A Ruby toolkit for building complete and robust CLI commands.
Ruby
162
star
5

nokogiri-diff

Calculate the differences between two XML/HTML documents.
Ruby
129
star
6

gem_home

A tool for changing your $GEM_HOME
Shell
118
star
7

digest-crc

A Cyclic Redundancy Check (CRC) library for Ruby.
C
89
star
8

chgems

DEPRECATED: use gem_home instead!
Shell
87
star
9

kramdown-man

Allows you to write man pages in pure markdown.
Ruby
85
star
10

rubygems-tasks

Simple Rake tasks for managing and releasing Ruby projects.
Ruby
78
star
11

hexdump.rb

Fully Featured and Fast hexdumping for Ruby.
Ruby
78
star
12

ruby-versions

A common repository of ruby version metadata
Shell
72
star
13

raingrams

A flexible and general-purpose ngrams library written in Ruby. Raingrams supports ngram sizes greater than 1, text/non-text grams, multiple parsing styles and open/closed vocabulary models.
Ruby
70
star
14

net-http-server

A pure Ruby HTTP Server.
Ruby
68
star
15

sketches

A Ruby library for live programming and code reloading.
Ruby
65
star
16

ruby-cli-boilerplate

Zero-dependency Ruby CLI boilerplate code
Ruby
59
star
17

deployml

DeploYML is a simple deployment solution that uses a single YAML file.
Ruby
58
star
18

command_mapper.rb

Maps external commands and options to Ruby classes
Ruby
55
star
19

ffi-hunspell

Ruby FFI bindings for Hunspell.
Ruby
48
star
20

combinatorics.rb

Bringing (more) Combinatorics to Ruby.
Ruby
46
star
21

wordlist.rb

A Ruby library and CLI for generating and working with wordlists.
Ruby
45
star
22

ffi-pcap

Ruby FFI bindings for libpcap.
Ruby
43
star
23

flv-dl

Downloads Flash Video (flv) files from web-pages.
Ruby
33
star
24

gscraper

A web-scraping interface to various Google Services.
Ruby
33
star
25

rprogram

A library for creating wrappers around command-line programs.
Ruby
32
star
26

ffi-libc

Useful Ruby FFI bindings for libc
Ruby
31
star
27

libBERT

A C library for encoding and decoding BERT (Binary ERlang Term)
C
31
star
28

scm

Ruby interface to common SCMs
Ruby
30
star
29

tdiff

Calculates the differences between two tree-like structures.
Ruby
29
star
30

wsoc

The Web Spider Obstacle Course
Ruby
24
star
31

cparser

A pure Ruby ANSI C Parser.
Ruby
23
star
32

multi_markdown

multi_markdown allows projects to use a wide variety of Markdown Processors, without having to depend on a specific one.
Ruby
19
star
33

npm_scan

Scans npmjs.org for npm packages that can be taken over
Crystal
18
star
34

dm-visualizer

Visualizes the Models, Properties and Relationships defined in a DataMapper based Ruby project.
Ruby
18
star
35

mruby-embed

Example project that embeds mruby.
Ruby
17
star
36

ffi-msgpack

Ruby FFI bindings to msgpack
Ruby
16
star
37

uri-query_params

Access the query parameters of a URI, just like $_GET in PHP.
Ruby
16
star
38

phishing-training-sigs

A crowd sourced list of phishing training simulators and their signatures
16
star
39

ffi-extractor

Ruby FFI bindings for libextractor
Ruby
15
star
40

yard-dm

A YARD plugin for parsing DataMapper syntax.
Ruby
14
star
41

dotfiles

Development Environment Configuration
Vim Script
13
star
42

test

A collection of boilerplate code and projects for testing ideas
Ruby
13
star
43

chars.rb

A Ruby library for working with various character sets, recognizing text and generating random text from specific character sets.
Ruby
13
star
44

example-activerecord-lib

Example usage of ActiveRecord in a Ruby library (not a Rails app or Rails engine)
Ruby
13
star
45

yard-spellcheck

Spellcheck your YARD documentation.
Ruby
12
star
46

ffi-http-parser

Ruby FFI bindings to the http-parser library.
Ruby
12
star
47

dm-is-authenticatable

A DataMapper plugin for adding authentication and encrypted passwords to your DataMapper models.
Ruby
12
star
48

dm-chunked_query

Allows performing chunked queries with DataMapper.
Ruby
12
star
49

object_loader

Load Objects from Ruby files without having to use YAML or define classes named like the file.
Ruby
11
star
50

vim-yard

A VIM plugin to add syntax highlighting to your YARD tags.
Vim Script
10
star
51

ruby-masscan

A Ruby interface to masscan, an Internet-scale port scanner.
Ruby
10
star
52

shodan-ruby

A Ruby interface to SHODAN, a computer search engine.
Ruby
10
star
53

parameters

Parameters allows you to add annoted variables to your classes which may have configurable default values.
Ruby
10
star
54

jekyll-static-import

[WIP] Import static HTML websites into Jekyll
Ruby
10
star
55

python-pickle.rb

A modern Ruby implementation of the Python Pickle serialization format.
Ruby
9
star
56

v4l2.cr

Crystal bindings for V4L2
Crystal
9
star
57

ffi-ptrace

Ruby FFI bindings for ptrace
Ruby
9
star
58

ffi-udis86

Ruby FFI bindings for udis86
Ruby
8
star
59

env_ext

Provides a Ruby interface to common environment variables
Ruby
8
star
60

pullr

A Ruby library for quickly pulling down or updating any Repository.
Ruby
8
star
61

ffi-bit_masks

FFI plugin which adds support for bit-wise fields (or flags) to FFI.
Ruby
8
star
62

ruby-amass

A Ruby interface to amass.
Ruby
8
star
63

sinatra-json

sinatra/json extracted from sinatra-contrib.
Ruby
7
star
64

pcap-ffi

Ruby FFI bindings for libpcap
Ruby
7
star
65

dm-is-read_only

A DataMapper plugin for making a Model absolutely read-only.
Ruby
7
star
66

gemspec.yml

Write your gemspecs in plain YAML
Ruby
7
star
67

crystal-crc

CRC (Cyclic Redundancy Check) algorithms for Crystal.
Crystal
7
star
68

ruby-ncrack

A Ruby interface to Ncrack.
Ruby
7
star
69

chars.cr

A Crystal library for working with various character sets, recognizing text and generating random text from specific character sets.
Crystal
7
star
70

nokogiri-ext

Useful extensions to nokogiri
Ruby
7
star
71

command_mapper-gen.rb

Generates command_mapper Ruby classes for a given command
Ruby
6
star
72

donatello

Highly configurable graphs ontop of Raphael.js.
JavaScript
6
star
73

ruby-yasm

A Ruby interface to YASM.
Ruby
5
star
74

fake_io.rb

A mixin module for creating fake IO-like classes.
Ruby
5
star
75

open_namespace

Allows namespaces to load constants on-demand
Ruby
5
star
76

zcow

Manages temporary zram backed COW (Copy On Write) devices.
Shell
5
star
77

postmodern.github.io

website | blog
HTML
5
star
78

dm-is-counter_cacheable

A DataMapper plugin for adding counter-cache properties to related models.
Ruby
5
star
79

ffi-libnet

Ruby FFI bindings for libnet
Ruby
4
star
80

dm-is-predefined

A DataMapper plugin for adding predefined resources to Models.
Ruby
4
star
81

ffi-libelf

Ruby FFI bindings for libelf
Ruby
4
star
82

ffi-bert

FFI bindings to libBERT, a library for encoding and decoding BERT data.
Ruby
4
star
83

badger

A fear-less, robust and portable systems management solution.
Ruby
4
star
84

ffi-cairo

Ruby FFI bindings for Cairo
Ruby
4
star
85

ffi-sundown

Ruby FFI bindings for the libupskirt markdown library.
Ruby
4
star
86

cvelist.rb

A Ruby library for parsing the CVE JSON in the cvelist git repository
Ruby
4
star
87

threaded_server

A generic TCP Server with a fixed-size Thread Pool.
Ruby
4
star
88

hunspell.cr

Crystal bindings for libhunspell. Crystal port of the Ruby ffi-hunspell gem.
Crystal
4
star
89

dm-types-legacy

A collection of legacy data types for DataMapper.
Ruby
4
star
90

command_kit-completion

Generate shell completions for command_kit commands
Ruby
4
star
91

netfilter-ffi

Ruby FFI bindings for netfilter libraries
Ruby
3
star
92

data_paths

DataPaths is a library to manage the paths to data/ directories within projects.
Ruby
3
star
93

ffi-llvm

Ruby FFI bindings for LLVM
Ruby
3
star
94

badger-ruby

A Ruby client for communicating with Badger servers.
Ruby
3
star
95

dm-is-checksumed

Adds checksum properties to DataMapper Models.
Ruby
3
star
96

yard-parameters

yard-parameters is a plugin for YARD for parsing parameters.
Ruby
3
star
97

rtoolchain

RToolchain is a Ruby interface to various toolchains and other compilers or assemblers. Currently RToolchain supports the GNU toolchain and NASM.
Ruby
3
star
98

hoe-yard

A Hoe plugin for generating YARD documentation
Ruby
3
star
99

rtranscoder

A Rubyful interface to various transcoding utilities
Ruby
3
star
100

dm-bug-report

A template for creating standalone scripts that reproduce bugs in DataMapper.
Ruby
3
star