Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Installs Ruby, JRuby, TruffleRuby, or mruby

License

NotificationsYou must be signed in to change notification settings

postmodern/ruby-install

Repository files navigation

InstallsRuby,JRuby,TruffleRuby (native / GraalVM), ormruby.

Features

  • Supports downloading the latest versions and checksums fromruby-versions.
  • Supports installing into/opt/rubies/ for root and~/.rubies/ for usersby default.
  • Supports installing into arbitrary directories.
  • Supports downloading from arbitrary URLs.
  • Supports downloading from mirrors.
  • Supports downloading/applying patches.
  • Supports passing in arbitrary./configure options.
  • Supports downloading archives usingwget orcurl.
  • Supports verifying downloaded archives via MD5, SHA1, SHA256 or SHA512checksums.
  • Supports installing build dependencies from the package manager(apt,dnf,yum,pacman,zypper,xbps,brew,macports, andpkg).
  • Supports many different OSes:
  • Has unit tests.

Anti-Features

  • Does not require upgrading 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 orcurl
  • md5sum ormd5
  • sha1sum orsha1
  • sha256sum orsha256
  • sha512sum orsha512
  • tar
  • bzip2
  • xz
  • patch (if--patch is specified)
  • gcc >= 4.2 orclang

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 specificrubies directory:

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

Install a Ruby into/usr/local:

$ sudo ruby-install --system 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 CRuby with jemalloc support:

$ ruby-install ruby 3.1.2 -- --with-jemalloc

Install CRuby with YJIT support:

$ ruby-install ruby 3.2.0 -- --enable-yjit

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 withRVM:

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

Using ruby-install withrbenv:

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

ruby-install can even be used withChef.

Install

wget https://github.com/postmodern/ruby-install/releases/download/v0.10.1/ruby-install-0.10.1.tar.gztar -xzvf ruby-install-0.10.1.tar.gzcd ruby-install-0.10.1/sudo make install

PGP

All releases arePGP signed for security. Instructions on how to import myPGP key can be found on myblog. To verify that a release was not tamperedwith:

wget https://github.com/postmodern/ruby-install/releases/download/v0.10.1/ruby-install-0.10.1.tar.gz.ascgpg --verify ruby-install-0.10.1.tar.gz.asc ruby-install-0.10.1.tar.gz

Homebrew

ruby-install can also be installed withhomebrew:

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 theAUR:

yaourt -S ruby-install

Fedora Linux

ruby-install is available onFedora Copr.

FreeBSD

ruby-install is included in the officialFreeBSD ports collection:

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

Known Issues

Please see thewiki.

Alternatives

Endorsements

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

--Sam Stephensonofrbenv


[8]ページ先頭

©2009-2025 Movatter.jp