Set the bin_path before the ruby_block

Setting the bin_path inside the ruby_block results in a no method
error because the only_if attempts to use it. Set this above the
ruby_block so it is available in the correct scope.