没有合适的资源?快使用搜索试试~ 我知道了~
首页Pragmatic - Agile Web Development with Rails 2nd
Pragmatic - Agile Web Development with Rails 2nd
5星 · 超过95%的资源 需积分: 10 15 下载量 95 浏览量
更新于2023-03-03
评论
收藏 5.94MB PDF 举报
Pragmatic - Agile Web Development with Rails 2ndPragmatic - Agile Web Development with Rails 2ndPragmatic - Agile Web Development with Rails 2ndPragmatic - Agile Web Development with Rails 2ndPragmatic - Agile Web Development with Rails 2ndPragmatic - Agile Web Development with Rails 2ndPragmatic - Agile Web Development with Rails 2nd
资源详情
资源评论
资源推荐
Important Information
About Rails Versions
Rails is an evolving framework. The core Rails developers are continually
m
aking changes, adding new features, fixing bugs, and so on. P eriodically
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 crea ted 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 availa b le, the 1.2 features are only a vailable in Edge Rails.
Now, i t 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 installed Ra ils (as
described in Chapter 3, I
nstalling Rails,
on page 31), bring up a command
prompt and enter
rails -v. If it reports “Rails 1.2” or la ter, you’re fine.
If
instead you see something like “Rails 1.1.6,” you’ll need to upd ate to get
the code in this b ook to run. We’ve prepared a snapshot of the Rails frame-
work code that we used when writing this book. You can install it in y our
own Rails applications as a temporary measure until 1.2 is released.
• Create your applica tion normally. You’ll find that it will contain a direc-
tory called vendor
• Download http://media.pragprog.com/titles/rails2/code/rails.z
ip into your
application’s
vendor directory and unzip it. It should create a new direc-
tory called
rails
• In your applica tion’s top-level directory, issu e the comman
d
rake rails:update
Once Rails 1.2 is released, 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 be used in producti on applications.
Dave Thomas
Agil e Web Develo pment with Rails
Second Edition
Dave Thomas
David Heinemeier Hansson
with
Leon Breedt
Mike Clark
James Duncan Davi d son
Justin Gehtland
Andreas Schwarz
The Pragmatic Bookshelf
Raleigh, North Carolina Dallas, Texas
Many of the designations used by manufacturers and sellers t o distinguish their products are
c
laimed as trademarks. Where those designatio ns appear in this book, and The Pragmatic Program-
mers, LLC was aware of a trademark claim, the designati ons have been printed in initial capital
letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Program-
ming, Pragmatic Bookshelf and the linking 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 information, as w ell as the latest Pragmatic ti tles, please
visit us at
http://www.pragmaticprogra mmer.com
Copyright
©
2
0
06 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 America.
ISBN-10: 0-977 6166-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, 2006
Version: 2006-11-2 2
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 Controll ers . . . . . . . . . . . . . . . . . . 22
2.2 Active Record: 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 Application . . . . . . . . . . . . . . . . . . . . . 43
4.2 Hello, Rails! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.3 Linking Pages Together . . . . . . . . . . . . . . . . . . . . . . . 56
4.4 What We Just Did . . . . . . . . . . . . . . . . . . . . . . . . . . 59
剩余722页未读,继续阅读
Williams_bzd
- 粉丝: 15
- 资源: 48
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2023年中国辣条食品行业创新及消费需求洞察报告.pptx
- 2023年半导体行业20强品牌.pptx
- 2023年全球电力行业评论.pptx
- 2023年全球网络安全现状-劳动力资源和网络运营的全球发展新态势.pptx
- 毕业设计-基于单片机的液体密度检测系统设计.doc
- 家用清扫机器人设计.doc
- 基于VB+数据库SQL的教师信息管理系统设计与实现 计算机专业设计范文模板参考资料.pdf
- 官塘驿林场林防火(资源监管)“空天地人”四位一体监测系统方案.doc
- 基于专利语义表征的技术预见方法及其应用.docx
- 浅谈电子商务的现状及发展趋势学习总结.doc
- 基于单片机的智能仓库温湿度控制系统 (2).pdf
- 基于SSM框架知识产权管理系统 (2).pdf
- 9年终工作总结新年计划PPT模板.pptx
- Hytera海能达CH04L01 说明书.pdf
- 数据中心运维操作标准及流程.pdf
- 报告模板 -成本分析与报告培训之三.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1