Coder Social home page Coder Social logo

rbpm's Introduction

rbpm (ruby path mangler)

https://github.com/omp/rbpm
Manage multiple Ruby installations with no black magic.


NOTES

  rbpm only manages rubies located in the ~/.rubies directory. This
  behaviour can be changed by setting the RUBIES_PATH environment
  variable to some other location. rbpm does not display information
  about rubies it does not manage, such as any system-wide install.

  rbpm performs a substring match when selecting a ruby, using the
  highest matching directory when there are multiple matches.


DEPENDENCIES

  bash (>= 4.0)
  coreutils (sort)
  findutils (xargs)


INSTALLING

  Save the script to a safe location, then add the following function to
  your ~/.bashrc or equivalent file:

      rbpm() { source <(/path/to/rbpm.sh "${@}"); }


INSTALLING RUBIES

  The path to the executable should look something like this:

      ~/.rubies/ruby-2.1.2/bin/ruby

  To install Ruby to this directory:

      $ wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2
      $ tar -xf ruby-2.1.2.tar.bz2
      $ cd ruby-2.1.2
      $ ./configure --prefix="${HOME}"/.rubies/ruby-2.1.2
      $ make
      $ make install


USAGE

  A sequence of commands showing rbpm in use:

      $ rbpm ls
        ruby-1.8.7-p374
        ruby-1.9.3-p547
        ruby-2.1.2

      $ rbpm set 2.1
      Adding /home/omp/.rubies/ruby-2.1.2/bin to PATH.

      $ rbpm ls
        ruby-1.8.7-p374
        ruby-1.9.3-p547
      * ruby-2.1.2

      $ ruby -v
      ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]

      $ rbpm set 1.9
      Removing /home/omp/.rubies/ruby-2.1.2/bin from PATH.
      Adding /home/omp/.rubies/ruby-1.9.3-p547/bin to PATH.

      $ ruby -v
      ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-linux]

      $ rbpm clear
      Removing /home/omp/.rubies/ruby-1.9.3-p547/bin from PATH.

  To set the version from a .ruby-version file:

      $ rbpm set $(cat .ruby-version)
      Adding /home/omp/.rubies/ruby-1.8.7-p374/bin to PATH.


AUTHORS

  David Vazgenovich Shakaryan


LICENSE

  Distributed under the terms of the MIT License.
  See included COPYING file for the full license text.


# vim: set sw=2 sts=2 ts=2 et tw=72 spell spl=en :

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.