Creating a Rails app and database with NetBeans 6.0 in minutes





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.


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.

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!
Here's a detailed tutorial of how to use Capistrano and Deprec (a set of add-on 'deployment recipes' for Capistrano) to put together a solid deployment system for your Rails applications on an Ubuntu server.


(photo credit: mrpattersonsir)
Antonio Cangiano has put together a reasonably meaty list of 10 Ruby on Rails performance tips. On the surface, his advice seems pretty good, but Rails veterans Evan Weaver and Josh Susser have quickly stepped in to question the motivation of Antonio's suggestions. Step into the debate or just enjoy some reasonably effective, if sometimes misguided, tips.

Mark A. McBride has put together a great article about processing credit cards with Ruby on Rails using the Active Merchant plugin.
In case the title of this post is giving you deja-vu, we've looked at "How To Create A Ruby Extension In C" before at Ruby Inside. We've also looked at using RubyInline to make the process even faster by not having to write a specialized C extension.
It's good to start seeing those Rails 1.2 guides coming out of the woodwork. Hopefully I'll get able to do a roundup of them shortly, but for now Andre Lewis presents a quick, practical guide to nesting CRUD resources in Rails 1.2.

Bruce Tate continues his fine Crossing Borders series with a look at Ruby's support for closures. If code blocks and block techniques used by routines such as Rails' respond_to confuse you, it's a great primer.
Russ Olsen has been putting together a small series of blog posts about building a DSL in Ruby. The first part dates from October 2006, but the second part has just been released, making it a good double length read. In the mini-series, Russ looks at the motivation for developing a DSL and develops a basic DSL called Potemkin.

You're about to start a new Rails project. Do you type rails <project name>? No, "Stop using the rails command", says Josh Susser. If you create a dummy / default Rails project that's set up just the way you like it with plugins, your own extensions, and all those carefully defined svn:ignore flags, you can just create a new Rails project with a simple svn copy. So simple, but I've totally missed this idea, and it's a real timesaver.
Amy Hoy has written a great tutorial running through the Rails console that's suitable for both complete novices and experts (there are a couple of tricks she mentions that I didn't know at least!). Amy appears to have taken up Slash7 with a new zeal lately, so let's hope we'll see more great content like this on her blog through 2007!


RailsForum.com has just announced the winners of their October Tutorial Contest. A lot of cool tutorials came out of the contest, so I wanted to link to them here.
1st place - HOWTO: Make a Rails Plugin From Scratch by Danger Stevens.
2nd place - Refactoring on Rails: Move to Model and Refactoring on Rails: Multiple Scopes in Controller by Ryan Bates.
3rd place - HOWTO: Send Instant Messages in Rails
Other entries
Image uploads and resizing for Rails models with mini-magick
XSS and when h() just ain't enough
Creating Two Models in One Form
Editing Multiple Models in One Form
Test Helper: Clean, Custom Assertion Messages
Debugging on Rails: Reading Stack Traces
Introduction to Form Helpers
Programming Best Practices
Advice to Rails Beginners: Follow Conventions
Handy RJS Tips
Using Autotest with Rails on Windows XP machines
Creating Many Models in One Form
Creating a Variable Number of Models in One Form
Getting Started With RESTful Rails
Rails Migration For Beginners



Austrian development agency, Sparkling Studios, look at how to use the Akismet anti-spam system to check data submitted to your site and protect your application from spam. It works by signing up for a key from Akismet and using a Ruby Akismet library. Then whenever you want to check your data, you make a simple call and Akismet returns a true or false based on whether the system believes the data to be spam.
Most init.d start-up scripts seem to be bash scripts, but you can write them with any language. Here's some template code I use to create my own Linux services. You can even add them to chkconfig to be started properly on startup, and they'll also work with RedHat / CentOS's service system straight off.
