Ran chmod ugo+x ex45.rb to change mode.