Professional Documents
Culture Documents
University of Edinburgh
An Introduction to
Ruby on Rails
Ken Dawson
November2006
AnIntroductiontoRubyonRails
November2006
AnIntroductiontoRubyonRails
November2006
AnIntroductiontoRubyonRails
AnIntroductiontoRubyonRails
November2006
Class
<=>
Cabbage
URL
<=>
http://<host>:<port>/cabbage/
AnIntroductiontoRubyonRails
$ rails demo
November2006
AnIntroductiontoRubyonRails
public/
index.html
dispatch.cgi
controllers/
apps/
script/
generate
server
models/
config/
database.yml environment.rb
views/
layouts/
November2006
AnIntroductiontoRubyonRails
AnIntroductiontoRubyonRails
public/
index.html
dispatch.cgi
controllers/
c1_controller.rb c2_controller.rb
November2006
apps/
script/
generate
server
config/
database.yml environment.rb
models/
c1.rb
c2.rb
views/
layouts/
AnIntroductiontoRubyonRails
c1/
c2/
10
public/
index.html
dispatch.cgi
controllers/
apps/
script/
generate
config/
server
models/
views/
layouts/
c1_controller.rb c2_controller.rb
c1.rb
c1/
c2/
c2.rb
c1.rb c2.rb
November2006
database.yml environment.rb
AnIntroductiontoRubyonRails
m1.rhtml m2.rhtml
11
A Real Application
The web application for tracking the
progress on development projects was
developed using Ruby on Rails.
The web site is at
https://devproj.inf.ed.ac.uk
It uses apache 1.3 as the web server and
mysql 3.23 as the database server.
November2006
AnIntroductiontoRubyonRails
12
References
http://wiki.rubyonrails.org/rails
http://api.rubyonrails.org/
http://www.rubycentral.com/
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html
November2006
AnIntroductiontoRubyonRails
13