Skip to content

Instantly share code, notes, and snippets.

@abernier
Created February 24, 2010 16:25
Show Gist options
  • Save abernier/313576 to your computer and use it in GitHub Desktop.
Save abernier/313576 to your computer and use it in GitHub Desktop.
$ ruby
puts "Hello, World!"
^D
Hello, World!
$ ruby -e 'puts "Hello, World!"'
Hello, World!
$ irb
>> puts "Hello, World!"
Hello, World!
=> nil
$ cat > hello.rb
puts "Hello, World!"
^D
$ ruby hello.rb
Hello, World!
$ which ruby
/usr/bin/ruby
$cat > hello.rb
#!/usr/bin/ruby
puts "Hello, World!"
^D
$ chmod +x hello.rb
$ ./hello.rb
Hello, World!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment