Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 30 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
30
Dung lượng
257,4 KB
Nội dung
[...]... also a Rails minor mode for Emacs .10 6 7 8 9 10 http://macromates.com/ http://www.eclipse.org http://www.jetbrains.com/idea/ http://www.vim.org/scripts/script.php?script_id =15 67 http://rubyforge.org/projects/emacs -rails/ In 19 97, Java IDEs were primitive compared to their C++ counterparts R UNNING THE S AMPLES 1. 6 Running the Samples Instructions for downloading the sample code are on page 16 The... go through the book Section 1. 2, Rails App in Fifteen Minutes, on page 21 has instructions to set up the People application Rails XT stands for Rails Exploration Testing.” The Rails XT application doesn’t have a unified feature set that addresses some problem domain Instead, Rails XT is a holding tank for dozens of fragments that A few examples rely on features in Rails 1. 2, which is still under development... How to Get Sample Code The sample code for the book uses Rails version 1. 1.6 or newer1 and Ruby version 1. 8.4 or newer All the sample code for the book is available as a single zip file online.2 The sample code includes two Rails applications, named People and Rails XT The People application is extremely simple and demonstrates how to use Rails to create a front end for a single database table We build... with Ruby and Rails But you do not have to do so Rails enthusiasts have created prepackaged solutions that install everything you need to get started On Windows On Windows, Instant Rails1 provides a self-contained Rails environment Instant Rails includes Ruby, Rails, Apache, and MySQL, all in a sandbox separate from anything else installed on your machine Instant 1 http://instantrails.rubyforge.org R... defaults 1. 4 Finding Information in Online Documentation All Rails developers should bookmark these documentation sites: http://api.rubyonrails.org Up-to-date documentation for the entire Rails API http://www.ruby-doc.org/ Ruby documentation metasite Pointers to library docs, books, training, and more http://www.ruby-doc.org/core Ruby Core documentation (roughly analogous to java. lang, java. io, and java. util)... http://pragmaticprogrammer.com/titles/fr _rails4 java/ code.html 1 16 P REFACE demonstrate Rails capabilities Because of its heterogeneous nature, Rails XT requires a bit more setup You don’t need to set up Rails XT to get started When you need to do so, you can find instructions in the sidebar on page 98 Here is a quick overview of the sample directory structure: rails_ xt This contains the Rails exploration tests (see Section 1. 6, Running... advantage of Ruby on Rails This book will explain how to get started Who Should Read This Book? This book is for all Java programmers OK, let us narrow that down a little This book is for two subsets of Java programmers: • Those who want to program in Ruby and Rails • Those who do not To the first group: We wrote this book because we love Java, and we love Rails We believe that Java programmers are... (http://www.radrails.org/) is built on top of Eclipse,7 so it runs almost everywhere It is a perfect choice if Eclipse is already your IDE of choice for Java IntelliJ IDEA (cross-platform) IntelliJ IDEA8 is expected to have Rails support via an IDEA 6.0 plugin We haven’t used it yet, but we have high hopes IDEA is our preferred IDE for Java development Old school There is a good Rails plugin for vim.9... the Java language and patterns, we are able to move quickly to the meat of topics We believe that, page for page, this is a much better book for Java developers than a general-purpose book can ever be Yes, that’s bragging, and we are boasting about you, our fellow Java developers Thanks for all the work you have put in to build a baseline of industry knowledge on which we hope to build Why This Rails. .. quality orientation that every Rails project has from the start You will see that even the simplest Rails application begins life with automated testing, documentation, and other product automation already in place When your Rails application starts to get complicated, you will already have the tools you need 1. 1 Setting Up Ruby and Rails Setting up Ruby and Rails is straightforward on all the major operating . Getting Started with Rails 20 1. 1 Setting Up Ruby and Rails . . . . . . . . . . . . . . . . . 20 1. 2 Rails App in Fifteen Minutes . . . . . . . . . . . . . . . . 21 1.3 The Rails Development Cycle. 0-977 616 6-9-X ISBN -13 : 978-0-977 616 6-9-5 Printed on acid-free paper with 85% recycled, 30% post-consumer content. First printing, February, 2007 Version: 2007-2 -12 Contents Foreword 11 Preface 13 1 Getting.