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

Author Archives: Peter Cooper

By Peter Cooper / March 4, 2007

Etexteditor

Over at the O’Reilly Ruby Blog, Jim Alateras laments the recent stalling of development on RadRails, but suggests an alternative solution: E-TextEditor, a “TextMate” alternative for Windows. The initial reports I’ve read about it are that it’s rather good, and after watching the screencast I’d say it looks to be a pretty good editor and I’d give it a try if if used Windows. If you’re a Windows user, give it a look.

Now for the editorial bit.. Read More

By Peter Cooper / March 3, 2007

Heiko Webers writes:

I think many of us share the perception of Rails being a “secure” framework. And that might well be true, because we need less code to get things done and less code means a better overview of what’s happening. But though Rails seems to be safer, doesn’t allow us to lean back. There has been a security bug in Rails last year and even in Ruby itself.

I’ve started a new blog about Ruby on Rails security concerns called “Ruby on Rails Security”. In the next few months I will address the secure configuration of web servers, how to securely set up MySQL, Rails and Subversion. Read More

By Peter Cooper / March 3, 2007

Picture 5
Pledgie is a new Rails-powered Web site that allows anyone to raise funds online for meaningful causes. There is no charge for the service. Instead, Pledgie’s goal is to create an online version of the personal, one-on-one interactions that traditionally are at the heart of successful grassroots volunteerism. Pledgie has recently been successful in helping Rick Olson and Justin Palmer raise some money to support their Mephisto blogging system.

Pledgie was created by Mark Daggett and Garry Dolley. Mark Daggett is a Social Software artist and researcher. Garry Dolley is a professional programmer and open source software advocate. Both are very active in the Ruby community and I took the opportunity to ask them some questions about their Rails development experiences. Read More

By Peter Cooper / March 3, 2007

A month ago, Pat Eyler (On Ruby), Apress, and I launched a Ruby blogging challenge with the question, “How Has Ruby Blown Your Mind?” .. There were 18 solid entries, and one late entry by Sean Hussey that I think would have won if it hadn’t come late. The eventual winner was Ruby Blocks as Closures by Gabe de Silveira, and he wins three Apress books of his choosing. Well done Gabe! Read More

By Peter Cooper / March 2, 2007

Coda Hale has announced the release of his new ‘bcrypt-ruby’ gem. bcrypt-ruby brings simple OpenSSL powered password hashing to Ruby along with some useful features like hash versioning, automatic salt handling, and the ability to produce hashes that are computationally difficult to compute to reduce the risks of attacks. Read More

By Peter Cooper / March 2, 2007

Murderers
Mike Clark has put together a stunningly simple tutorial covering how to create a complete file uploading and image resizing system in mere minutes using Rick Olson‘s attachment_fu plugin. What impresses me the most is that he shows how attachment_fu can automatically store uploaded files on Amazon’s S3 service with only a few tweaks. This is a must read for Rails developers who haven’t brushed up on their file upload techniques lately. Read More

By Peter Cooper / March 2, 2007

Jruby

Dominic Da Silva has put together a quick tutorial with plenty of screenshots showing how to run a Rails application on JRuby. Read More

By Peter Cooper / March 1, 2007

Googmapsapress

Beginning Google Maps Applications with Rails and Ajax is a book by Andre Lewis, Michael Purvis, Jeffrey Sambells, and Cameron Turner that, simply, looks at how to develop Google Maps powered applications using Rails. You can read some sample chapters from the very-similar PHP edition (sorry!) on the official site.
The authors are running a free prize draw for at least 3 free copies of the book, and entries must be in by midnight on March 14th Eastern Time. They call it a ‘contest’ but you don’t have to actually do anything other than fill in your name and e-mail address, and they actively support you passing the link around so all your friends can enter too (unless they happen to work for Apress). Read More

By Peter Cooper / March 1, 2007

Pdfcalendars

Ilya Grigorik has put together a little tutorial demonstrating how to dynamically create PDF “photo calendars” with Ruby. The calendar aspect might not seem particularly interesting to you, but the tutorial is notable for demonstrating how to easily embed images into PDFs dynamically. Read More

By Peter Cooper / March 1, 2007

Shakespeare Comic

Just ten days ago Gregg Pollack and Jason Seifer launched their new Rails blog, Rails Envy, with a great acts_as_ferret tutorial. I told them to keep up the good work, and they have! Today they’ve posted an amazing Ruby on Rails page caching tutorial that covers page caching to a good depth including configuration, sweepers, cache location, and Apache/Lighttpd integration. Sadly it doesn’t touch on fragment and action caching, but Gregg assures us all that a post about these tools is forthcoming. Read More

By Peter Cooper / February 28, 2007

Matt Neuburg has put together a great article full of examples of using Ruby and AppScript in place of AppleScript to script operations under OS X. I hadn’t bothered to try these Ruby->OS X bridges yet, but I followed Matt’s simple examples with amazement. It’s so simple! Within two pages Matt moves on to using Ruby to instruct Microsoft Excel to produce a graph based on data provided from Ruby and it’ll only take you up to ten minutes to read the whole thing and get that far. Excellent piece.

Matt seems to prefer to installing rb-appscript from source, but being a lazy-ass, I installed it in gem fashion with a simple sudo gem install rb-appscript. Read More

By Peter Cooper / February 27, 2007

Byororwa

Build Your Own Ruby on Rails Web Applications is a new book by Patrick Lenz published by SitePoint. The book is available order in print and PDF forms (click the preceding links to order direct from SitePoint).

The Content

BYORoRWA (hereafter called “the book”) is a very practical Rails book that focuses almost entirely on the development of a Digg-like Web application from start to finish. There’s a comprehensive guide to install Rails on Windows, Linux, and OS X, and within 50 pages most of the concepts relating to Rails and creating, running, and accessing a dummy application are covered. Read More

By Peter Cooper / February 27, 2007

Ed-Ruby

I’m not a big IDE or a Windows user myself, so getting me to review a Windows-based IDE could be quite tough. However, the creator of ED, Neville Franks, is an Australian-based independent software developer (trading as Soft As It Gets) and wrote such a nice e-mail that I felt obliged to take a look.
ED is a Windows-only editor with over 20 years’ of history, having first been commercial released in the 80s, crammed with features a lot of developers seem to love, and with support for about twenty different programming languages out of the box. The latest is Ruby which Neville has so far been impressed with. Read More

By Peter Cooper / February 27, 2007

Jonathan Conway of New Bamboo (more on this at the end of this post) has put together a rather comprehensive walkthrough on using mocks with Rails and using them to define your interfaces. Not having cut my teeth with mocks yet, I took the rare step of asking for a personal summary of the article by the author himself, and Jonathan delivered!

Everyone’s heard of using stubs and mocks to replace external systems or third party libraries within their applications tests, but something a lot of people don’t realise is that by stubbing and/or mocking associated models in unit tests it allows them to think more clearly about the interfaces in which they communicate with each other, hopefully leading to less coupling and a cleaner design. Read More

By Peter Cooper / February 26, 2007

Skype and Google Talk are pretty clever in the way that they still work even if all of its users are behind firewalls (or NAT systems) that block incoming connections. The way they enable two-way connections is by using a ‘firewall busting’ technique. Simply, a central server does nothing but share IP addresses (and port numbers) and clients can then ‘punch’ holes through their firewalls and trick their firewalls and routers to route incoming packets back to them if they have certain source host and port numbers.

I was playing with the technique and have put together an example client that you can run on two separate hosts that have no open incoming ports but which demonstrates two way connection to an arbitrary port (6311 in this case) with UDP. Read More