Apress

Beginning Rails 3 Cover Image

Beginning Rails 3 is the practical starting point for anyone wanting to learn how to build dynamic web applications using the latest release of the Rails framework for Ruby. You'll learn how all of the components of Rails fit together and how you can leverage them to create sophisticated web applications with less code and more joy.

Full Description

  • ISBN13: 978-1-4302-2433-4
  • 400 Pages
  • User Level: Beginner
  • Publication Date: August 31, 2010
  • Available eBook Formats: EPUB, MOBI, PDF
  • Print Book Price: $39.99
  • eBook Price: $27.99
Buy eBook Buy Print Book Add to Wishlist

Related Titles

Full Description

Beginning Rails 3 is the practical starting point for anyone wanting to learn how to build dynamic web applications using the Rails framework for Ruby. You'll learn how all of the components of Rails fit together and how you can leverage them to create sophisticated web applications with less code and more joy.

This book is particularly well suited to those with little or no experience with web application development, or who have some experience but are new to Rails. Beginning Rails 3 assumes basic familiarity with web terms and technologies, but doesn't require you to be an expert. Rather than delving into the arcane details of Rails, the focus is on the aspects of the framework that will become your pick, shovel, and axe. Part history lesson, part introduction to object-oriented programming, and part dissertation on open source software, this title doesn't just explain how to do something in Rails, it explains why.

  • Learn to create Rails web applications from scratch
  • Includes a gentle introduction to the Ruby programming language
  • Completely updated to include the features of Rails 3

What you’ll learn

Rails 3 includes the combined power of Rails and Merb. Beginning Rails 3 will get you started in learning this technology and creating dynamic web applications in next to no time.

  • Install Rails on a Mac, Windows, or Linux system
  • Understand the Model-View-Controller architecture
  • Learn the value of databases and how to set up MySQL in Rails
  • Get instant feedback on your work by testing in the Rails Console
  • Add Ajax and visual effects to create rich user interfaces
  • Use and create your own Rails plug-ins

Who this book is for

Web developers who want to harness the power of Rails 3 to quickly build dynamic rich Internet applications. Anyone who hasn't used Rails before will be able to learn the basics from this book.

Table of Contents

Table of Contents

  1. Introducing the Rails Framework
  2. Getting Started
  3. Getting Something Running
  4. Working with a Database: Active Record
  5. Advanced Active Record: Enhancing Your Models
  6. Action Pack: Working with the View and the Controller
  7. Advanced Action Pack
  8. Improving Interaction with Ajax
  9. Sending and Receiving E-Mail
  10. Testing Your Application
  11. Internationalization
  12. Extending Rails with Plug-ins
  13. Deploying Your Rails Applications
  14. Ruby, a Programmer’s Best Friend
  15. Databases 101
  16. The Rails Community
  17. Git
Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.

Errata

If you think that you've found an error in this book, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.

* Required Fields

On page 91:

In the top paragraph it is stated that the names of join tables are formed by the names of the tables being joined in alphabetical order (ie. articles_categories). In the following Figure 5.4 the join table is named categories_articles.

On page 202:
The jQuery installation instructions are clear enough, but I ran into problems.

First - the file available at http://github.com/rails/jquery-ujs/raw/master/src/rails.js indicates that it requires jQuery 1.6.0 or later.

Second - after downloading and installing the most recent stable version of the jquery.min.js file from http://code.jquery.com (which happens to be 1.6.2) and making the appropriate changes in the app/views/layouts/application.html.erb file (the 'jquery-1.4.2.min' parameter becomes 'jquery.min') the result is a completely non-functional "new comment" link. I've also tried the older jquery-1.6.0.min.js file - with the same poor results.

At the time of this posting I've not yet found a solution to this problem (and any help would be greatly appreciated).

On page 204-205:

I am running Rails 3, which includes jQuery by default, so I skipped the jQuery installation section. When I used the code on pages 204-205 to implement a JavaScripted new comment button, the button didn't do anything at all. It is not functional. Are there known fixes to this?

On page 229:

In the Chapter Sending and Receiving E-Mail, Letting Authors Know About Comments:

"Listing 9-11. Adding the comment_added Method to app/models/notifier.rb:"

should be

"Listing 9-11. Adding the comment_added Method to app/mailers/notifier.rb:"