没有合适的资源?快使用搜索试试~ 我知道了~
Agile Web Development with Rails 2nd Edition
需积分: 9 452 下载量 187 浏览量
2007-07-13
02:19:57
上传
评论
收藏 8.34MB PDF 举报
温馨提示
试读
723页
Agile Web Development with Rails 2nd Edition
资源推荐
资源详情
资源评论
Prepared exclusively for Leah Halperin
Important Information
About Rails Versions
Rails is an evolving framework. The core Rai ls developers are continually
making changes, adding new features, fixing bugs, and so on. Per iodically
they package up the latest version of Rails into a release. These releases are
then available to application developers as RubyGems.
This book is written for Rails 1.2.
As the book is going to press the core team have created the codebase for
Rails 1.2. However, they have not yet packaged it into a gem. This gives us a
bit of a problem. We want the book to reflect all the latest and greatest Rails
features, but we also know that it is hard for folks to jump through the hoops
required to get the so-called Edge version of Rails installed on their systems.
And until a gem is availab le, the 1.2 features are only available in Ed ge Rails.
Now, it may well be that by the time you get your hands on this book, the
Rails 1.2 gem is out. It’s easy to find out. After you’ve instal led Rai ls (as
described in Chapter
3, Installing Rails, on page 31), bring up a command
prompt and enter
rails -v. If it reports “Rail s 1.2” or later, y ou’re fi ne.
If instead you see something like “Rails 1.1.6,” you’ll need to updat e to get
the code in this book to run. We’ve prepared a snapshot of the Ra ils frame-
work code that we used when writing this book. You can install it in your
own Rails applications as a temporary measure until 1.2 is released.
• Create your application normally . You’ll find that it will contain a direc-
tory called vendor
• Download http://media.pragprog.com/titles/rails2/code/rails.zip into your
application’s
vendor directory and unzip it. It should crea t e a new direc-
tory called
rails
• In your applica t ion’s top-level directory, issu e the command
rake rails:update
Once Rails 1 .2 is relea sed , you can install it and remove the directory tree
vendor/rails from your applications.
The version of Rails from our web site is not an official release, and should
not b e used in production applicat ions.
Dave Thomas
Prepared exclusively for Leah Halperin
Agile Web De velop men t with Rails
Second Edition
Dave Thomas
David Heinemeier Hansson
with
Leon Breedt
Mike Clark
James Duncan Davidson
Justin Gehtland
Andr eas Schwarz
The Pragmatic Bookshelf
Raleigh, North Carolina Dallas, Texas
Prepared exclusively for Leah Halperin
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in this book, and The Pragmatic Program-
mers, LLC was aware of a trademark claim, the designations have b een printed in initi al capital
letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Program-
ming, Pragmatic Bookshelf and the li nking g device are trademarks of The Pragmatic Programmers,
LLC.
Every precaution was taken in the preparation of this book. However, the publisher assumes no
responsibility for errors or omissions, or for damages that may result from the use of information
(including program listings) contained herein.
Our Pragmatic courses, workshops, and other products can help you and your team create better
software and have more fun. For more i nformat ion, as well as the latest Pragmatic titles, please
visit us at
http://www.pragmaticprogrammer.com
Copyright
©
2006 The Pragmatic Programmers LLC.
All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any
form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the
prior consent of the publisher.
Printed in the United States of Am erica.
ISBN-10: 0-9776166-3-0
ISBN-13: 978-0-9776166-3-3
Printed on acid-f ree paper with 85% recycled, 30% post-consumer content.
P1.00 printing, November 22, 200 6
Version: 2006-11-22
Prepared exclusively for Leah Halperin
Con t ents
Preface to the Second Edition 12
1 Introduction 14
1.1 Rails Is Agile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.2 Finding Your Way Around . . . . . . . . . . . . . . . . . . . . . 17
1.3 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Part I—Getting Started 21
2 The Architecture of Rails Applications 22
2.1 Models, Views, and Controllers . . . . . . . . . . . . . . . . . . 22
2.2 Active R ecord: Rails Model Support . . . . . . . . . . . . . . . . 25
2.3 Action Pack: The View and Controller . . . . . . . . . . . . . . 29
3 Installing Rails 31
3.1 Your Shopping List . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.2 Installing on Windows . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3 Installing on Mac OS X . . . . . . . . . . . . . . . . . . . . . . . 34
3.4 Installing on Linux . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.5 Development Environments . . . . . . . . . . . . . . . . . . . . 36
3.6 Rails and Databases . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.7 Keeping Up-to-Date . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.8 Rails and ISPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4 Instant Gratification 43
4.1 Creating a New Appli cation . . . . . . . . . . . . . . . . . . . . . 43
4.2 Hello, Rails! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.3 Linking P ages Together . . . . . . . . . . . . . . . . . . . . . . . 56
4.4 What We Just Did . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Prepared exclusively for Leah Halperin
剩余722页未读,继续阅读
资源评论
light_amazing
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C#,煎饼排序问题(Pancake Sorting Problem)算法与源代码
- C#,排列组合的堆生成法(Heap’s Algorithm for generating permutations)算法与源代码
- C#,老鼠迷宫问题的回溯法求解(Rat in a Maze)算法与源代码
- 6693eeb8d683458a07938615fba9e68f.apk
- C#,数值计算,解微分方程的龙格-库塔二阶方法与源代码
- C#,数值计算,用割线法(Secant Method)求方程根的算法与源代码
- C#,子集和问题(Subset Sum Problem)的算法与源代码
- mongodb 数据库基本操作
- Linux操作系统基础教程
- Linux操作系统相关习题集
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功