Jump to ratings and reviews
Rate this book

Practical Ruby Gems

Rate this book
This book is a comprehensive guide to utilizing and creating Ruby Gems. Coverage provides an enormous code library that will help developers improve their projects. It details 34 of the best and most useful Gems, including ones to speed up web applications, process credit card payments, produce PDF documents, read and update RSS feeds, and acquire real-time shipping prices from FedEx and UPS. Each of these also comes complete with actual use cases and code examples that readers can immediately use in their own projects. In addition, the book describes how readers can package and distribute their own Ruby Gems.

286 pages, Paperback

First published January 1, 2007

6 people want to read

About the author

David Berube

10 books3 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
0 (0%)
4 stars
3 (33%)
3 stars
4 (44%)
2 stars
1 (11%)
1 star
1 (11%)
Displaying 1 - 3 of 3 reviews
Profile Image for James Stewart.
38 reviews6 followers
January 14, 2008
For those who aren't aware, ruby gems refers a way of packaging up code so it can be easily distributed for other developers to use, and a tool to help with the distributing and/or installing that code.

On first glancing at this book, I wondered how you could fill a full-length book on the topic of gems. While getting the tools installed on some systems requires care, and there's space for a couple of chapters on packaging your own libraries as gems, both topics have been covered alongside other topics in numerous volumes. What I'd missed was that contents not only covers both of those topics, but also looks at 26 different gems and explains how you might use them in your projects.

The coverage of setting up and using ruby gems at the start of the book, and on packaging and distributing your own gems at the end of the book are brief but cover the basics well enough. It might have been helpful had the latter included a little information on how to include other libraries that need to be compiled and managing the cross-platform issues that raises. Chances are anyone planning to do that is well capable of reverse-engineering a gem spec file to work out what's needed, but it would have added some weight and helped these chapters stand out from their equivalents in other volumes.

The gems profiled cover a wide range of uses: databases, certain web services, parsing HTML, web frameworks, recurring events, PDF generation, and more. Most of them are pretty well known libraries, but few of us will have had a chance to try them all out and newcomers to the ruby community looking for some support in their projects may well find some useful tips within.

For each gem there is an introduction, some basic code samples, a lengthier code sample (with commentary) and conclusion. That repetition means this isn't a book many will want to wade through in one go. I found that after a while I needed a break, and if reading the book it may be best to pick out a gem that particularly interests you, read the relevant section and then write some code of your own before moving on to another.

A number of times I wondered if it would be preferable to drop some of the best known gems (there are plenty of ActiveRecord examples floating around) in favour of a little more depth. In particular it would have been interesting to see a dissection of how a few of the gems work, as a sign that anyone can contribute, to see what can be learned from techniques used, and to better understand how the gems in question can be used. Such explorations might serve to break up the text a bit, as well as providing useful insights into ruby development and perhaps broadening the appeal of the book a little.

Overall, Practical Ruby Gems was a helpful read and there are a few new gems I'm going to be exploring as a result of my reading, but you may well want to take a close look before investing in a copy. You may broaden your ruby knowledge in the reading, but you're unlikely to deepen it significantly.

Disclaimer: I was sent a copy of this book for review by the publisher.
Profile Image for Robert Beveridge.
2,402 reviews199 followers
November 9, 2010
David Berube, Practical Ruby Gems (Apress, 2007)

If you've been following my reviews and you've seen the Ruby and Rails books go by for the past year, you probably know exactly what I'm going to say about this one before I even say it. So I'll keep this short and sweet: it's dated, but you'll learn some interesting stuff from it. Which is true of pretty much every Ruby book I've seen come across my path that was printed more than a year ago. Such is the curse of only being able to afford used copies of computer books, I guess. (Hey, Apress: if a few Rails 3 books were to come Amazon Vine's way, no one would complain.) ***
Profile Image for Pablo.
Author 1 book43 followers
February 24, 2011
There's some useful bits at the beginning about using gem. I was expecting much more about developing gems (for example, how to develop a gem and use it in a Rails project at the best time). Most of the book is documentation for some gems, which is likely to be obsolete and best to read it when you need that gem in particular.
Displaying 1 - 3 of 3 reviews