
Many have learned the basics of using Git from the PeepCode Git screencast. In this PDF, Scott Chacon goes even further to explain the distributed filesystem behind the popular source code management system.
If you’re tired of terse man pages or academic white papers, you’ll enjoy more than four dozen colorful diagrams that clearly explain the complicated inner workings of Git.
The first 50 pages explain the storage system that powers Git, and an additional 60 pages go into detail about using Git on a day to day basis. You’ll learn not only how to use the basic commands, but will also learn different strategies for working via either a centralized or distributed collaboration model. This is a great companion to the existing PeepCode screencast or a useful book in its own right.
As a bonus, several short screencasts are included which show how to use the basic Git commands.
The Git source code control system continues to win over developers who are impressed with the speed and flexibility of the distributed workflow. Go beyond the basics with this PDF from PeepCode.
Available as part of the PeepCode Unlimited package or as a single purchase for only US$9!




by Andrew Stewart
Plugins are the approved way to add custom features to Rails or even modify its built-in behavior.
This 100 page PDF book walks through common techniques for augmenting models, views, controllers and routes. You’ll also learn about the important parts of a generator, all in ways compatible with Rails 2.
If you’ve wanted to write an acts_as plugin or if you’ve wondered what alias_method_chain really does, this is the book for you.
Only US$9, or available to PeepCode Unlimited members immediately!



MySQL (or Postgres) does a fine job when querying specific rows, but it’s not so great when it comes to searching on large text fields. Sphinx is a search service that makes full text searching quite easy and throws in extra features like boolean search (“rails OR merb”), word proximity, and custom filtering.
Pat Allan is the author of the popular Thinking Sphinx plugin for Rails (and Merb apps that use ActiveRecord!). He also wrote the Riddle gem for lower level interaction with Sphinx. Pat starts out by introducing the basic features of Sphinx, then dives straight into installation on popular platforms.
In this 60-page PDF you’ll learn to build an address book with Thinking Sphinx starting with simple searches then progressing onto filtered, sorted, and delta-based searches. You’ll learn about the geo-searching features of Sphinx, including integration with Google Maps.
He closes out the book with a 20-page reference that you’ll want to keep close as you use the more advanced features of Sphinx.
If you use MySQL or Postgres databases with text fields, this book will teach all you’ll need to know to work confidently with Sphinx.
Included for all PeepCode Unlimited subscribers or available as a single purchase for only US$9!
Chapters

This is a summary of some of the challenges we’ve had with our Ruby on Rails Git migration and attempting to use submodules for vendor/rails and various plugins. We’ve run in to problems switching and merging between branches with and without submodules. Once I work this all out, I’ll write up a “real” article for BuildingWebApps.com.
Sorry, it was a really long night, so I’m a bit Ga Ga. This is a summary of some of the challenges we’ve had with our Git migration and attempting to use submodules for vendor/rails and various plugins. We’ve run in to problems switching and merge between branches with and without submodules. Once I work this all out, I’ll write up a “real” article for BuildingWebApps.com.
For our current project, we’ve made the migration over to the Git distributed version control system. I’ve been using Git for tracking 3rd party open source projects, as well as using Mercurial. I’m still learning the ropes. Git’s support for branching was the main selling point for us. We’ve been using Subversion for a long time with great success, but the biggest weakness has been how much a pain it is to have multiple branches and deal with multi-way merges. While switching to Git requires a bit of a learning curve, it isn’t too bad.
Git makes working with multiple branches a relative breeze. Last week, I decided to give the submodule feature a try for tracking Ruby on Rails (vendor/rails) Edge, as well as a to migrate various plugins over. We used Piston in Subversion to good effect, and submodules seemed adequate as a replacement. There are numerous articles about setting up submodules, a couple of good ones are here and here.
Our scenario may or may not be that unique. We have a master branch (and other working branches) that represent our “version 1” code tree. We are doing a large refactoring in a set of branches for “version 2”. The two lines are running in parallel, and we occasionally merge/rebase from version 1 over to version 2. Version 1 is frozen around Rails 2.0.2. Version 2 is tracking Edge. I’ve set up version 2 to use submodules for vendor/rails as well as a number of our plugins. We are using Git 1.5.5.x at the moment.
The problem appears to be when you swap between branches of version 1 and version 2 (those without submodule and those with, respectively). There may be other problems, but we are tracking this down (interestingly, I have seen different results between Git 1.5.4 and 1.5.5, bugs?).
Starting with a clean clone of the remote repository (we are using GitHub quite happily), all starts out good. The master branch is clean and version 1 looks good.
I then switch to version 2 with a git checkout --track -b version2 origin/version2. Remember that version 2 is using submodules for vendor/rails and some plugins (e.g. rspec, rspec-rails, acts_as_versioned, etc.). I see delete messages for vendor/rails and the submoduled plugins. Interestingly, if I then do a git status, I see two entries (one for vendor/rails, another for one plugin—acts_as_versioned in this example). I don’t see the other plugins. The correlation here appears to be that the delete status only exists for those plugins that exist currently on the master (version 1) branch.
If I do git submodule init next, I see entries for all of my submodules being “registered”. If I then immediately do a git submodule update, I see the standard updating/downloading type messages and get the correct versions. Now if I git status, all on the version2 branch appears “clean”.
At this point, if I want to switch back to master (version1 branch), things go a bit crazy. If the immediate next command is git checkout master, I get the dread “error: Untracked working tree file ‘vendor/plugins/acts_as_versioned/CHANGELOG’ would be overwritten by merge” error (where the file may be different). Again, this appears to be in a directory where in the version 2 branch it is a submodule, but in the version 1 branch it is not.
Now I’m stuck. Various combinations of git clean don’t seem to help. git status insists the working directory is clean.
So, how do I go back?
If I git checkout master -f, I can switch. But, and a big but, the plugins that aren’t supposed to be in this branch and a variety of files from vendor/rails appear when doing a git status. If I clean those with git clean, I get a whacked directory tree.
Pending figuring this out, I’m switching back to the static inclusion of files in the vendor area and tracking them by hand. I’ll document a solution when found (or if anyone can set me straight or send pointers).

By Geoffrey Grosenbach. Technical consultation from RSpec committer David Chelimsky.
RSpec 1.1 introduces a new feature…user stories.
You can now write plain-text stories that fit into the XP style of development. You can use stories written by customers to execute code against your application, or you may choose to use stories as a part of your development workflow.
The implementation of RSpec stories also fills a gap once filled by Rails’ integration tests. RSpec stories run against the whole stack of your application, including routes, controllers, models, and views.
This 50-minute screencast introduces stories and shows you how to use them with pure Ruby code or inside a Rails application.




The first REST screencast was the top-selling screencast at PeepCode for over a year. We’ve started from scratch and built this one from the ground up for Rails 2 (a few Rails 2.1 features are used, too!).
RESTful routes have been a big part of Rails since version 1.2, but they are also very confusing! They’re all about building your application to deliver HTML and API-friendly XML from a single piece of data.
This screencast covers the basics of REST and walks through a simple application to show how REST routes work. You’ll learn about the magic that goes on behind the scenes and how you can design a REST application with confidence.
Routes, URLs, forms, testing, and general tips are covered over the course of 57 minutes of the high quality, professional production you’ve come to expect from PeepCode. We touch on ActiveResource briefly. Simple, clear diagrams are featured throughout.
If you are already familiar with how to build a Rails application, this screencast will give you the knowledge you need to convert an existing application to REST or design a new app with the principles of REST.
Features a handy chapter track for jumping to specific topics. Code samples are included as well.
Included with PeepCode Unlimited and also available for only US$9!
Those who purchased this screencast subsequent to December 2007 will receive an automatic upgrade to this new screencast.





You have a nil object when you didn't expect it!
The error occurred while evaluating nil.build

Merb is a Rails clone.
So why should you use it?
It’s a great companion to Rails for specific tasks like concurrent file uploads. It can also hold its own for small single-file applications and larger high performance, thread-safe installations.
This 60-page draft PDF presents the philosophy of Merb and shows you how to setup a Merb application, work with controllers, and build models.
Future updates to this PDF will explore more advanced controller features and show how Merb approaches forms, templates, and testing.
A Merb screencast will also be released in the next few months as a separate $9 purchase.
Merb is still somewhat experimental and bugs are being discovered and fixed. However, it is a great experimental framework for the developer who wants to stay on the edge of web application development technology.

Guyren Howe has considerable experience with both MySQL and PostgreSQL. He discusses the myriad technical and other advantages to using PostgreSQL instead of MySQL for, well, pretty much anything.
Bonus content: download the slides from this talk.


by Cody Fauser, ActiveMerchant committer and Shopify developer.
Most online businesses need to receive payment. If you’re developing with Ruby, the standard for credit card authorization and capture is ActiveMerchant.
ActiveMerchant provides a consistent interface to over 30 gateways all around the world and has processed millions of dollars of transactions since 2006. This 70 page book starts with a simple payment and steps through the development of database models and gateway interaction code within a Rails application.
You’ll also learn how to write a comprehensive test suite and integrate the Acts as State Machine plugin to build a reliable payment processing system. Finally, you’ll learn about industry standards and security precautions.
Many books show you how to build a Rails-based shopping cart, but this is the only book to take you the rest of the way through to payment authorization and capture.
Purchase includes downloadable code samples used in the book.
Examples use the Braintree Payment Gateway but are relevant for any gateway supported by ActiveMerchant.



Web applications become much more useful when powered by the oldest communication technology on the Internet: email.
This 60 page PDF shows how to use the MMS2R RubyGem to receive and parse email from both desktop clients and mobile devices. You’ll learn about:
As mobile devices become more common, applications need to be able to not only send messages, but receive communication from phones and other handheld devices. This book will give you the knowledge to build applications that accept input from email and MMS messages. You may even be inspired to start a new application, just to take advantage of how easy it is!
Written by Mike Mondragon and Luke Francl, authors of the MMS2R RubyGem and consultants on FanChatter and other mobile sites.
Available as part of the PeepCode Unlimited package or as a single purchase for only US$9!



Technical editing by the creators of Phusion Passenger™.
Phusion Passenger™ dropped onto the scene in early 2008 and immediately caused quite a stir.
Many developers have hoped for a way to run Rails applications natively inside Apache, and now it’s possible! Passenger™ makes development easier and is the best way to run Rails applications on shared hosts. You may even find it so easy to use that you choose to deploy your production applications with it as well.
After viewing this 54 minute screencast, you’ll be a Passenger expert. You’ll learn:
Included for all PeepCode Unlimited subscribers, or available alone for only $9!
Now with 25% more pixels than the competition! Uses a full 1000×600 of screen real estate with smoother, high frame rate animations.




Our fifth podcast episode has been posted today. In it, we dig a little deeper and explore some of the ins and outs of Rails form processing. At a conceptual level, we explain how forms and models work together, and the glue that binds them within the controller. Along the way, we touch on validation, error message passing, and utilizing Ajax techniques.
We received some great feedback for “more code”. We hear you! The show notes for the current series really are just showing snippets and are intended to simply illustrate a concept. In time, we’ll be going in to things in more depth, and at that point, we’ll provide full working source files.
Currently, we are working on preparation tasks for the RailsQuickStart. If you are just starting out, and not only want the concepts but also want to get your hands dirty with some friendly folks at your side, this is the place to be in February. The code we are using in the seminar will be a useful starting point for your own sites, and in it, we will be showing compete working examples of most of the concepts we cover in the podcast.