Ruby On Rails Tutorial Book.pdf
(
4872 KB
)
Pobierz
293875699 UNPDF
2
Ruby on Rails Tutorial
Send Feedback
Ruby on Rails Tutorial
Learn Rails by Example
Michael Hartl
2
Ruby on Rails Tutorial
Send Feedback
Contents
1 From zero to deploy
9
1.1 Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.1.1 Comments for various readers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.1.2 “Scaling” Rails
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.1.3 Conventions in this book
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.2 Up and running
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.2.1 Development environments
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.2.2 Ruby, RubyGems, and Rails
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.2.3 The sample application
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.2.4 Model-view-controller (MVC)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.2.5
script/server
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.3 Version control with Git
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.3.1 Installation and setup
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.3.2 Adding and committing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
1.3.3 What good does Git do you?
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.3.4 GitHub
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.3.5 Branch, edit, commit, merge
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.4 Deploying
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
1.4.1 Heroku setup
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
1.4.2 Heroku deployment, step one
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
1.4.3 Heroku deployment, step two
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
1.4.4 Heroku commands
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1.5 Conclusion
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2 Mostly static pages
43
2.1 Static pages
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.1.1 Truly static pages
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.1.2 Static pages with Rails
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.2 Our first tests
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.2.1 Testing tools
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.2.2 TDD: Red, Green, Refactor
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.3 Slightly dynamic pages
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
2.3.1 Testing a title change
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.3.2 Passing title tests
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
2.3.3 Instance variables and Embedded Ruby
. . . . . . . . . . . . . . . . . . . . . . . . 68
2.3.4 Eliminating duplication with layouts
. . . . . . . . . . . . . . . . . . . . . . . . . . 71
3
Plik z chomika:
ggozer246
Inne pliki z tego folderu:
Apress - Beginning CSS Web Development From Novice to Professional (2006).pdf
(5125 KB)
Apress - Practical Rest On Rails 2 Projects (2008).pdf
(6093 KB)
Wrox - Professional Ruby on Rails (2008).pdf
(4501 KB)
Rails3 in Action.pdf
(8097 KB)
RubyOnRails3Tutorial.pdf
(8746 KB)
Inne foldery tego chomika:
CPPdkW7
Hacking
HTML
Informatyka
Inne
Zgłoś jeśli
naruszono regulamin