Code Monkey home page Code Monkey logo

rtx-ruby's Introduction

rtx-ruby

Build Status

Ruby plugin for rtx version manager

Install

rtx plugin add ruby

Please make sure you have the required system dependencies installed before trying to install Ruby. It is also recommended that you remove other ruby version managers before using rtx-ruby

Use

Check rtx readme for instructions on how to install & manage versions of Ruby.

When installing Ruby using rtx install, you can pass custom configure options with the env vars supported by ruby-build.

Under the hood, rtx-ruby uses ruby-build to build and install Ruby, check its README for more information about build options and the troubleshooting wiki section for any issues encountered during installation of ruby versions.

You may also apply custom patches before building with RUBY_APPLY_PATCHES, e.g.

RUBY_APPLY_PATCHES=$'dir/1.patch\n2.patch\nhttp://example.com/3.patch' rtx install ruby 2.4.1
RUBY_APPLY_PATCHES=$(curl -s https://raw.githubusercontent.com/rvm/rvm/master/patchsets/ruby/2.1.1/railsexpress) rtx install ruby 2.1.1

Running rtx plugin-update ruby will update rtx-ruby and ensure the latest versions of ruby are available to install. By default rtx-ruby uses the latest release of ruby-build, however instead you can choose your own branch/tag through the RTX_RUBY_BUILD_VERSION variable:

RTX_RUBY_BUILD_VERSION=master rtx install ruby 2.6.4

Default gems

rtx-ruby can automatically install a set of default gems right after installing a Ruby version. To enable this feature, provide a $HOME/.default-gems file that lists one gem per line, for example:

bundler
pry
gem-ctags

You can specify a non-default location of this file by setting a RTX_GEM_DEFAULT_PACKAGES_FILE variable.

Migrating from another Ruby version manager

.ruby-version file

rtx uses the .tool-versions for auto-switching between software versions. To ease migration, you can have it read an existing .ruby-version file to find out what version of Ruby should be used.

Troubleshooting

If you are moving to rtx-ruby from another Ruby version manager, it is recommended to completely uninstall the old Ruby version manager before installing rtx-ruby.

If you install rtx and rtx-ruby and it doesn't make ruby and irb available in your shell double check that you have installed rtx correctly. Make sure you have system dependencies installed BEFORE running rtx install ruby <version>. After installing a Ruby with rtx, run type -a ruby to see what rubies are currently on your $PATH. The rtx ruby shim should be listed first, if it is not rtx is not installed correctly.

Correct output from type -a ruby (rtx shim is first in the list):

ruby is /Users/someone/.local/share/rtx/installs/<RUBY_VERSION>/ruby
ruby is /usr/bin/ruby

Incorrect output type -a ruby:

ruby is /usr/bin/ruby

rtx-ruby's People

Contributors

stratus3d avatar hashnuke avatar fazibear avatar jdx avatar samford avatar znz avatar breunigs avatar vlazar avatar fumiyashibusawa avatar seansith avatar f440 avatar burnettk avatar thiagoa avatar pat avatar kachick avatar kelseydh avatar kassio avatar jsmestad avatar jfly avatar il-santo avatar serixscorpio avatar djmarcin avatar charlesbjohnson avatar carlosantoniodasilva avatar smmr0 avatar stevenschobert avatar stanhu avatar sakakibara avatar sjaveed avatar san983 avatar

Stargazers

Yusuke Saito avatar Peter Boling avatar Masato Sugiyama avatar

Watchers

Peter Boling avatar  avatar

Forkers

dfang

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.