Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Created December 27, 2013 03:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jtimberman/8142003 to your computer and use it in GitHub Desktop.
Save jtimberman/8142003 to your computer and use it in GitHub Desktop.
#!/bin/sh
bin_path=/opt/ruby-210/embedded/bin
update-alternatives --install /usr/bin/ruby ruby $bin_path/ruby 10 \
--slave /usr/bin/irb irb $bin_path/irb \
--slave /usr/bin/erb erb $bin_path/erb \
--slave /usr/bin/rdoc rdoc $bin_path/rdoc \
--slave /usr/bin/ri ri $bin_path/ri \
--slave /usr/bin/testrb testrb $bin_path/testrb \
--slave /usr/bin/rake rake $bin_path/rake
# gem can't be slave of ruby: it is a master alternative.
update-alternatives --install /usr/bin/gem gem $bin_path/gem 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment