Set search path for Ruby scripts
Table of Contents
Suppose that the search path is ~/ruby. Add the following line in .bashrc.
export RUBYPATH=~/ruby
Put ruby scripts in ~/ruby. Suppose that “test.rb” is in this directory. Call the script with -S option in any directory.
$ ruby -S test.rb