Fresh Ruby Enhanced SHell automatically detects, if your current command should be Ruby or a system command.
Jan Lelis
gem "ripl-fresh", "~> 0.1.2"