Cheat Sheet for REST on Rails




Following on from his original interview with Charles Nutter and Thomas Enebo of the JRuby team, Pat Eyler has interviewed the team again (read part 1 then part 2), with the addition of Ola Bini. Both parts are quite long and go into a lot of detail about JRuby and Ruby's existence under the Java umbrella.

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.
SessionTimeout is a Rails plugin by Luke Redpath that makes enforcing short session times easy, like so:
James Edward Gray II laments:


BetaBrite is a Ruby LCD sign library developed by Aaron Patterson. Since few people have LCD signs to play with, Aaron has set up a test-bed installation that you can use via DRb. Ingenious! Next I expect a Ruby blinkenlights library and DRb hookup.
(First seen at why's)
Jon Maddox was inspired by Ruby Inside's previous post about init.d startup scripts, and has put together a UNIX init.d script that can start, stop, and restart all of your Rails apps' Mongrel clusters automatically. The benefit of Jon's approach is that unlike with the startup script supplied with Mongrel, you don't need to manually copy in each Mongrel configuration file to make it work. Instead, you tell the script under which folder your apps are hosted, and it looks for your Mongrel cluster configuration files automatically. This is an ideal script if you have multiple Rails apps on a single machine and want to stop and start the entire set at once.
It's not a common pursuit but some developers would like to look through the source code to Ruby itself. It's a great way to start if you ultimately want to get involved with helping develop Ruby itself, but it's heavy stuff. Mauricio Fernandez, however, has put together a brief guide to the different source files you should read relating to different elements of functionality within Ruby. Experts only.
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.