SlideShare a Scribd company logo
Ruby 1.9 & Rails 3
      new stuff!
Ruby 1.9
Ruby 1.9 And Rails 3.0
Ruby 1.9
Ruby 1.9.1   Stable
Installation
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar zxvf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243
./configure --program-suffix=1.9
make
sudo make install
Installation
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar zxvf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243
./configure --program-suffix=1.9
make
sudo make install
Installation
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar zxvf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243
./configure --program-suffix=1.9
make
sudo make install
Installation
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar zxvf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243
./configure --program-suffix=1.9
make
sudo make install
Installation
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar zxvf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243
./configure --program-suffix=1.9
make
sudo make install
Installation
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar zxvf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243
./configure --program-suffix=1.9
make
sudo make install
Installation
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar zxvf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243
./configure --program-suffix=1.9
make
sudo make install
Installation
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar zxvf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243
./configure --program-suffix=1.9
make
sudo make install
Changed stuff
case
String#[]
Hashes are sorted!
Block variables
New stuff!
        Jay!
flexible parameters
flexible parameters (2)
new hash notation
Symbol#to_proc
Enumerator
lambda - shorthand
lambda - calling
Object#tap
Rails 3
Merb
Ruby 1.8.7 or 1.9.1
ORM Agnostic
ActionORM

• initialize
• new_record?
• errors
• valid?
• to_model
Rack Middleware
Ruby 1.9 And Rails 3.0
controller actions
Ruby 1.9 And Rails 3.0
Session
Param parsing
Rescuing
Router
Multiple apps
Controller


                     Merb
                    Router


                     Rails
Request   Router
                    Router


                   Sinatra app



                    Rack app
Plugin API
Notifications
  (used to be “Orchestra”)
Hook into events
Ruby 1.9 And Rails 3.0
non-blocking
Javascript
non-obtrusive
Ruby 1.9 And Rails 3.0
Ruby 1.9 And Rails 3.0
Library agnostic
rails.prototype.js
rails.jquery.js
rails.moo.js
rails.you?.js
ActionController::Responder
code
Custom Responders
Ruby 1.9 And Rails 3.0
Ruby 1.9 And Rails 3.0
Public API Changes
Rails 2.3 == Rails 3.0
Questions?

More Related Content

Ruby 1.9 And Rails 3.0

Editor's Notes

  1. Rails 3 is een merge van alle good-practices van Merb en RailsMerb is een framework geschreven omdat ze vonden dat Rails bepaalde dingen fout deden.
  2. Rails 3.0 is niet 1.8.6 compatibel
  3. ActiveRecord & Datamapper doen dit al, Sequel gebruikt hier een adapter voor
  4. Rack, Framework to interact between WebServers and Web frameworks. Takes in request, handles it, passes it to Framework.