OSX: This works from the command line:
alias ruby="/opt/local/bin/ruby1.9"
but in side a shell script, it has no effect. I want to write a script that will switch between ruby 1.8 and ruby 1.9, so this needs to be a script - not in my profile.
It appears "source script.sh" works, but "./script.sh". Why is this? How can I replicate this in my script?