New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One-liner to get a precompiled Ruby on your own servers #13

crohr opened this Issue Feb 13, 2016 · 0 comments


None yet
1 participant

crohr commented Feb 13, 2016

At Packager we maintain ruby binaries for all the distributions we support (Debian / Ubuntu / CentOS / RHEL / Fedora), regularly updated to keep up with patch releases.

Even without using our packaging service, it's actually pretty useful to just get Ruby and Rubygems installed on a new server in no time.

It's similar to what you can achieve with or rbenv, but you don't need to install any tool, and the binaries make no assumption that they'll be running under RVM or rbenv.

For instance, let's say you wanted to install Ruby 2.1.4 on a Ubuntu 14.04 server:

    $ curl -o - | sudo tar xzf - -C /usr/local

    $ ruby -v
    ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-linux]

    $ gem -v

Replace ubuntu-14.04 and 2.1.4 in the cURL command with, respectively, any of the supported distributions and any of the supported ruby versions (coming back to ruby 1.9.2), and you're good to go:


    $ curl -o - | sudo tar xzf - -C /usr/local


    $ curl -o - | sudo tar xzf - -C /usr/local

    $ curl -o - | sudo tar xzf - -C /usr/local


    $ curl -o - | sudo tar xzf - -C /usr/local


    $ curl -o - | sudo tar xzf - -C /usr/local

Note that you can extract the archive into any directory, which may be better if you don't want to run tar as root, or pollute your /usr/local directory. For instance:

    $ curl -o - | tar xzf - -C ~/custom/path

    $ ~/custom/path/bin/ruby -v
    ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-linux]

    $ ~/custom/path/bin/gem -v

In that case, you need to specify the full path to the binaries, or add it to your $PATH.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment