Coder Social home page Coder Social logo

ruby-install's Introduction

ruby-install

Build Status

Installs Ruby, JRuby, Rubinius, MagLev or mruby.

Features

  • Supports installing arbitrary 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 using md5sum, md5 or openssl md5.
  • 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.

Requirements

  • bash >= 3.x
  • wget or curl
  • md5sum, md5 or openssl md5.
  • tar
  • patch (if --patch is specified)
  • gcc >= 4.2 or clang

Synopsis

List supported Rubies and their major versions:

$ ruby-install

Install the current stable version of Ruby:

$ ruby-install ruby

Install a latest version of Ruby:

$ ruby-install ruby 1.9

Install a specific version of Ruby:

$ ruby-install ruby 1.9.3-p429

Install a Ruby into a specific directory:

$ ruby-install -i /usr/local/ ruby 1.9.3-p429

Install a Ruby from an official site with directly download:

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

Install a Ruby from a mirror:

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

Install a Ruby with a specific patch:

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

Install a Ruby with a specific C compiler:

$ ruby-install ruby 1.9.3-p125 -- CC=gcc-4.7

Install a Ruby with specific configuration:

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

Integration

Using ruby-install with RVM:

$ ruby-install --rubies-dir ~/.rvm/rubies ruby 2.0.0-p247

Using ruby-install with rbenv:

$ ruby-install --rubies-dir ~/.rbenv/versions ruby 2.0.0-p247

ruby-install can even be used with Chef.

Install

wget -O ruby-install-0.4.3.tar.gz https://github.com/postmodern/ruby-install/archive/v0.4.3.tar.gz
tar -xzvf ruby-install-0.4.3.tar.gz
cd ruby-install-0.4.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://raw.github.com/postmodern/ruby-install/master/pkg/ruby-install-0.4.3.tar.gz.asc
gpg --verify ruby-install-0.4.3.tar.gz.asc ruby-install-0.4.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

Known Issues

Ruby

Rubies older than 1.9.3-p429 will not compile with Clang and require GCC >= 4.2. Normally, Linux and BSD systems will already have GCC installed. OS X users can install GCC via homebrew:

brew tap homebrew/versions
brew install gcc48

And run ruby-install again:

ruby-install ruby 1.9.3-p125 -- CC=gcc-4.8

Rubinius

Rubinius 1.x and 2.0.x is not supported due to multiple bugs. Instead, please use Rubinius >= 2.1.x.

Alternatives

Endorsements

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

-- Sam Stephenson of rbenv

ruby-install's People

Contributors

postmodern avatar havenwood avatar stefanozanella avatar jacknagel avatar pbrisbin avatar fesplugas avatar gevans avatar agis avatar bkutil avatar cbandy avatar cscorley avatar garybernhardt avatar georgebellos avatar gregkare avatar jacobbednarz avatar justincampbell avatar paul avatar hsbt avatar spastorino avatar msnexploder avatar hone avatar trek avatar

Watchers

Steve avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.