> 6.+( 7 ) # Method with argument
=> 13
> 6.5.+ 7 # You can add integer to float. And skip par.
=> 13.5
> 6 + 7 # This is the same as 6.+( 7 )
=> 13

$git --versiongit version 1.8.3.4 (Apple Git-47)
https://code.google.com/p/git-osx-installer/git-1.8.3.2-intel-universal-snow-leopard.dmg
$type rvm | head -1rvm is a function$rvm -vrvm 1.22.17 (stable) by Wayne E. Seguin ...
$\curl -L https://get.rvm.io | bash -s stable$rvm list<list of rubies>$irb2.0.0-p247 :002 > 2+2 => 42.0.0-p247 :005 > require 'active_support/all' => true 2.0.0-p247 :006 > 1.day.ago => 2013-10-16 17:49:11 +0200
$sqlite3
SQLite version 3.7.12 2012-04-03 19:43:07
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .quit
$heroku version heroku-toolbelt/3.0.0 (x86_64-darwin10.8.0) ruby/1.9.3$heroku login Enter your Heroku credentials. Email: gdj@sent.com Password (typing will be hidden): Authentication successful.
> 6=> 6 > 6.5 => 6.5
> Bob
NameError: uninitialized constant Bob
from (irb):45
from /Users/gdj/.rvm/rubies/ruby-2.0.0-p247/bin/irb:16:in `'
> "Bob"
=> "Bob"
> :Bob
=> :Bob
> 6.even? # Ruby ignores anything after '#'=> true > 6.5.even? # Ruby understands first dot is decimalNoMethodError: undefined method `even?' for 6.5:Float from (irb):50 from /Users/gdj/.rvm/rubies/ruby-2.0.0-p247/bin/irb:16:in> 6.+( 7 ) # Method with argument => 13 > 6.5.+ 7 # You can add integer to float. And skip par. => 13.5 > 6 + 7 # This is the same as 6.+( 7 ) => 13
> x NameError: undefined local variable or method `x' for main:Object from (irb):31 from /Users/gdj/.rvm/rubies/ruby-2.0.0-p247/bin/irb:16:in> x = 6 => 6 > x => 6 > x = 7 # x is changed to a different value (x is a variable) => 7 > x + 6 => 13 > recipient = "Bob" => "Bob" > recipient + "@gmail.com" => "Bob@gmail.com"
> ingredients = ["milk", "eggs", "flour", "oil" , "salt"]
=> ["milk", "eggs", "flour", "oil", "salt"]
> ingredients.first
=> "milk"
> ingredients[4] # This is just a method call. Looks funny.
=> "salt"
> recipe = {:milk => "2dl", :eggs => 2, :flour => "1hg"}
=> {:milk=>"2dl", :eggs=>2, :flour=>"1hg"}
> recipe.size
=> 3
> recipe[:eggs] # This is also a method call
=> 2 '> 6.class
=> Fixnum
> 6.5.class
=> Float'> "Bob".class => String > :Bob.class=> Symbol
'> ingredients.class
=> Array
> recipe.class
=> Hash> recipient => "Bob" > recipient.concat "@example.com" => "Bob@example.com" > recipient => "Bob@example.com"> recipe[:salt] = "1pinch" => "1pinch" > recipe => {:milk=>"2dl", :eggs=>2, :flour=>"1hg", :salt=>"1pinch"}
> fahr = 90
=> 90
> celsius = (5.0/9.0) * (fahr - 32)
=> 32.22222222222222
> fahr = 80
=> 80
> celsius = (5.0/9.0) * (fahr - 32)
=> 26.666666666666668 > def fahr_to_celsius( fahr ) > (5.0/9.0) * (fahr - 32) > end => nil > fahr_to_celsius 80 => 26.666666666666668 > fahr_to_celsius 70=> 21.11111111111111
'> class Temperature ?> def initialize( fahr ) ?> @fahr = fahr ?> end ?> def to_celsius ?> (5.0/9.0) * (@fahr - 32) ?> end ?> end => nil'> fahr = Temperature.new 60 => #<Temperature:0x007fc8b38481f8 @fahr=60><0x007fc8b38481f8> '> fahr.to_celsius => 15.555555555555557
pwd (print working directory)
ls (list files)
cd <directory name> (change directory - .. (two dots) to move up)
mkdir <directory name> (make/create directory)
$ rails new notify --skip_bundle create create README.rdoc...$ cd notify$ bundle install...Your bundle is complete!
$ ls appassets controllers helpers mailers models views$ rails s...
$ git init
Initialized empty Git repository ...
$ git status
...
$ git add .
$ git commit -m 'Added all auto-created files'
[master (root-commit) 592573a] Added all auto-created files
53 files changed, 821 insertions(+)
create mode 100644 .gitignore
... $ ls -al...
$ rails generate scaffold topic title:string description:text invoke active_record create db/migrate/...


scheme://domain:port/path?query_string#fragment_id
$ls -al ~