Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Author Archives: Peter Cooper

By Peter Cooper / May 29, 2007

Facebookplatform

FaceBook, a popular social networking site, recently announced the availability of an API, allowing third party developers to build tools, apps, and systems that integrate with FaceBook and which FaceBook users can use from within their accounts. MySpace users, who are used to copying and pasting crazy blocks of HTML into their profile foxes, will be aware of what a big deal this is.

Hot on the heels of this announcement, Matt Pizzimenti has updated RFaceBook, a Ruby library for integrating with FaceBook, to support various features of the API. It’s not something I’m likely to use, or that I fully understand, but the initial response to RFaceBook appears to be incredibly positive, so if FaceBook is your cup of tea, check it out. Read More

By Peter Cooper / May 26, 2007

Blink and you’d miss it, but Ruby Inside celebrates its first anniversary today. To commemorate it, I want to post about the history of the site, how it all came together, present some statistics, and give some blog-related tips for anyone else who wants to create a similar blog.

Why?

51J3Rnl9Fal. Aa240

Ruby Inside was initially conceived as a promotional vehicle for my then-nascent Beginning Ruby book, now published by Apress and available from all good bookstores (and some bad ones, I imagine). The idea was to produce a blog suited towards casual or beginner Rubyists, the ideal market for the book, but as the subscriber count sharply grew through 2006, Ruby Inside gradually became a general-purpose publication for all Rubyists. Read More

By Peter Cooper / May 22, 2007

Andrzej Krzywda has put together a solid, 15 point tutorial on how to build a Rails application from the ground up using Test Driven Development (TDD) techniques. This is pure gold because so few of the books and “how to build a blog in 5 minutes” type articles bother to cover testing and Andrzej shows how to get into the habit from almost the first step. Read More

By Peter Cooper / May 20, 2007

Scaling

Scaling a Rails Application from the Bottom Up was a presentation by Jason Hoffman, CTO of Joyent. The PDF of the presentation has a mega 192 slides and touches on a ton of interesting stuff about scaling and deployment (all the way down to hash based filing).

Forkoff

Angels & Daemons (PDF of slides) was a presentation by Tammer Saleh of Thoughtbot, Inc that went into the details of building daemons and how to daemonize processes in Ruby. The PDF on its own is pretty useful.
Hcapistrano

Harnessing Capistrano came from Jamis Buck of 37signals. The presentation is reasonably heavy on practical knowledge and will be of use to Capistrano newcomers. Read More

By Peter Cooper / May 20, 2007

Rspec-1

The RSpec development team have just announced the release of RSpec 1.0, the first major version of what has become a popular “Behavior Driven Development” library for Ruby.

If you’re fresh to RSpec, check out the official home page for a compelling example, or straight from the mouths of the RSpec team:

RSpec provides a Domain Specific Language for describing and verifying the behaviour of Ruby code with executable examples.

Some people like to call these examples “tests”. In fact, they are. But we believe that tests have equally important value as documentation and as a design aid, and that the testing nomenclature and syntax in most unit testing frameworks keep too much focus on only the testing value, and hide the design and documentation value. Read More

By Peter Cooper / May 17, 2007

Railsconftwitter

Twitter is a current flavor of the month Web 2.0 site where you can post small messages and receive small messages sent by other people online or via SMS. It’s pretty cool and it’s become extremely popular in the last few months. Lots of Rails and Ruby developers are using it to keep each other in the loop with what’s going on in their lives. This, coupled with the ability to read “up to the second” messages about what’s going on and the start of RailsConf today, means it’s an ideal candidate for a Flash visualization of on-the-fly RailsConf updates. Read More

By Peter Cooper / May 16, 2007

Frank

Francois Lamontagne is a Québecois Ruby and Rails developer whose blog, Ruby Fleebie, has recently become quite popular due to both having some great tutorial / reference-type posts, and Francois’ rather proactive methods of promoting it on DZone.
Ecstatik

Francois has also released Ecstatik, a Rails-powered Digg-like site that presents humorous links (to photos and videos, etc). In many regards it feels like a user-driven equivalent of Fark, although the focus is on funny links over community (for now).

I decided to ask Francois some questions about the Ruby Fleebie blog and how Ecstatik was developed and deployed. Read More

By Peter Cooper / May 15, 2007

Ruport

Gregory Brown has just announced the release of Ruport 1.0, a collection of tools that provide “reporting” functions within Ruby. A Rails plugin, acts_as_reportable, is also available to make report generation from Rails applications easy. Reporting tools work by taking your data, processing it using a report definition, then provide output in various formats (on-screen, to file – such as PDF, to print, etc).

Ruport2

Gregory has put together a short example and release notes for anyone who’s not familiar with the concept over at the O’Reilly Ruby blog, and there are also some presentations for your viewing pleasure.

(Thanks to Ruby Inside contributor Hendy Irawan for his additions to this post.) Read More

By Peter Cooper / May 15, 2007

Railsrefactoring

Rails Refactoring is an e-book written by Trotter Cashion (of MotionBox) and published by Addison-Wesley. Targeting developers who are tentatively dipping a toe into the world of REST, Rails Refactoring looks at how to turn your old-fashion unRESTian Rails code into the modern REST-capable equivalent. The first major section, for example, delves into respond_to and provides a ‘motive’, the ‘steps’ for implementation, and example code samples to back up the steps. Other refactorings, such as CRUD routing and ActiveResource are presented in a similar ‘motive’, ‘steps’ and ‘examples’ format.

Beyond basic refactoring, the e-book has several chapters covering controllers, routes, views, tests, authentication, and the consumption of external REST APIs all from a REST point of view. Read More

By Peter Cooper / May 14, 2007

Victor Igumnov has put together a simple walkthrough of how to package a Rails application into a single WAR file to run on a Tomcat server using JRuby, a pure Ruby PostgreSQL library (no ActiveRecord-JDBC needed!), and GoldSpike (JRuby addon that provides rake tasks to make WAR files). This is useful knowledge for anyone who might be forced into deploying Rails apps in an enterprise type system where Tomcat may be the only viable deployment option. Read More

By Peter Cooper / May 14, 2007

Scrobbler

John Nunemaker has put together a pretty tight library for accessing Last.fm data called Scrobbler. gem install scrobbler will get you most of the way there, and then you can quickly find recent tracks for any user, tracks for particular albums, and all sorts of great data. This could be a useful library for anyone putting together some sort of social networking or profile app in Rails who wants to show a user’s recently listened tracks within their own system. Read More

By Peter Cooper / May 14, 2007

A few days ago Kirk Haines announced the release of Swiftiply, an “agnostic clustering proxy for web applications that is specifically designed to support HTTP traffic from web frameworks.” In particular, it’s a fast, clustering proxy that uses untraditional methods to deliver a lot of dynamism, reliability and performance. Naturally, the first target for Swiftiply’s benefits is Rails, in the shape of a replacement to the mongrel_rails script (merb is also directly supported).

This all sounds like sales talk, but merb creator Ezra Zygmuntowicz has posted about his experiences with using Swiftiply to serve one of his Rails apps and has noticed a significant increase in daemon performance. Read More

By Peter Cooper / May 10, 2007

Erlectricity is a very early stage library in a “pre-release” stage that acts as an interoperability bridge between Ruby and Erlang processes. Scott Fleckenstein is the developer, and he is going to continue blogging about Erlectricity’s development, and Ruby / Erlang interoperability on his blog. While this topic isn’t quite mainstream yet, many Ruby developers have become interested in Erlang lately and Ruby / Erlang interoperability and co-operation is likely to become a big topic in the Ruby community towards the end of the year. Read More

By Peter Cooper / May 7, 2007

Railsbrain

Rails documentation sites are almost ten a penny, but today I was surprised by a new site called RailsBrain. RailsBrain takes the usual “list of methods down the left” approach, but couples it with some nifty AJAX and (so far) a very quick server to serve up the docs in record time.

Being in Europe, I usually notice a couple of seconds here and there when loading pages, but RailsBrain is scarily quick at delivering pages when I click on a method name. Furthermore, RailsBrain makes it a lot easier to find the method you need to documentation for with a “live search” type effect in the left hand box. Read More

By Peter Cooper / May 5, 2007

Activescaffold-1

AjaxScaffold was an early attempt to implement Rails’ scaffolding features in an AJAXy way, providing a single-page interface for showing, editing, deleting, and sorting items from your Rails models. ActiveScaffold is the newest implementation of the concept, making AjaxScaffold obsolete. It includes RESTful API support, sorting, search, pagination, automatic handling of ActiveRecord associations, along with the features you were used to from AjaxScaffold. It’s also guaranteed to work on relatively new versions of Firefox, Internet Explorer, and Safari. Read More