I'm going to contradict mrb and say that you can do alternates, without changing the "#!" line.
Suppose you have a ruby script with
#!/usr/bin/env ruby as the first line.
/path/to/better/ruby/version/whatever to run the script, you set the PATH environment variable to have
/usr/local/bin/ruby to run the script? Set PATH appropriately:
Note that fiddling with PATH can cause other problems in the case that the ruby executable you want to run the script resides in the same directory with other alternate programs. For example, if
/usr/local/bin had BSD
sed in it as well as
ruby, then when you set
PATH=/usr/local/bin:$PATH you will get the BSD executables instead of Linux executables. That could case a problem.