Skip to content

Instantly share code, notes, and snippets.

@jeffmccune
Created April 27, 2012 23:18
Show Gist options
  • Save jeffmccune/2514237 to your computer and use it in GitHub Desktop.
Save jeffmccune/2514237 to your computer and use it in GitHub Desktop.
Ruby, I'm surprised by you, OK? You're not bash.
[jeff@maynard] (feature/master/registry_key_purge_values)(dirty)[█▆▁]1.8.7 /vagrant/modules/registry
$ cat foo.rb
#! /bin/bash
#
echo bar
[jeff@maynard] (feature/master/registry_key_purge_values)(dirty)[█▆▁]1.8.7 /vagrant/modules/registry
$ ruby foo.rb
bar
@jeffmccune
Copy link
Author

@daniel-pittman

Right, but marking the file as executable and letting the system start the interpreter process is different than using the shell and passing the script directly to ruby:

Notice I do ruby foo.rb and not ./foo.rb

The syntax checking command for a ruby file is something like: ruby -W1 -c foo.rb

@slippycheeze
Copy link

Ah. Yes, so I see. How precious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment