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

By Peter Cooper / December 12, 2007

We’re taking a brief break from the regular “Interesting Ruby Tidbits” posts to focus on Rails™ only for a change. Rails has just made it to version 2.0 so there’s been plenty of action in the community. Here are some of the highlights:

The First Rails 2.0 Screencast

I can’t confirm the validity of its title, but The First Rails 2.0 Screencast is a screencast by Fabio Akita that walks through building a RESTful blog system in 30 minutes using Rails 2.0.

PeepCode Rails2 PDF (now in Spanish too!)

Rails2” is a 58-page e-book (available in PDF format) by Ryan Daigle and published by Geoffrey Grosenbach’s Peepcode that demonstrates how to use Rails 2.0′s new features. Read More

By Peter Cooper / December 12, 2007

Utility Belt bills itself as “a grab-bag of tricks, tools, techniques, trifles, and toys for IRB,” the interactive Ruby shell. If you’re a keen IRB user, Utility Belt offers up a metric ton of features that will promote you to power user in no time including interaction with your favorite text editor, clipboard support, Pastie posting, Amazon S3 shortcuts, auto-indentation, and more. Utility Belt appears to be optimized somewhat for OS X but most of the features will work on other platforms too. Read More

By Peter Cooper / December 8, 2007

After two successful release candidate releases, Ruby on Rails™, a popular Ruby-based Web application development framework in a similar vein to Merb or Nitro, has successfully made it to the final release of version 2.0. Previously called an “evolutionary rather than revolutionary” step, Rails™ 2.0 nonetheless packs a whole ton of new features that make it a worthwhile upgrade from 1.x. Unsurprisingly, David Heinemeier Hansson, creator of Rails, has the best writeup in the official launch announcement.

Also bound to be of interest to Rails 2.0 users:

Rails 2 Upgrade Notes – Some notes from Ben Smith covering the process of upgrading an application from using Ruby 1.2.6 to Rails 2.0. Read More

By Peter Cooper / December 7, 2007

ActiveJax is a Rails plugin developed by Nicholas Schlueter that acts as a bridge between ActiveRecord and Prototype-backed JavaScript. This means you can call ActiveRecord model methods from JavaScript using AJAX. Example:

ActiveJax.Author.find_by_name(“Nicholas Schlueter”).each(function(author) {alert(author.name);});

I asked Nicholas how this differs from the existing Jester library developed by Thoughtbot. One significant difference is the syntax. ActiveJax’s mechanisms are all embedded underneath the ActiveJax object, whereas Jester offers up the “models” more directly within JavaScript. ActiveJax also doesn’t depend on the application providing RESTful services, it’s possible to call any method on the models. All this said, the motivations for using Jester versus ActiveJax cross significantly, so it’s worth checking out both libraries if this is an area that interests you. Read More

By Peter Cooper / December 7, 2007

Rak, by Daniel Lucraft, is billed as a “grep replacement in pure Ruby.” Even though it’s a reasonably generic system tool simply written in Ruby, it actually has a bunch of features that are useful to Ruby and Rails developers specifically. It’ll ignore the .svn, .cvs and pkg directories that might be present in your projects. It uses ANSI to give color highlighted output (as seen in the screenshot above). It also accepts Ruby syntax regular expressions and even lets you perform basic Ruby operations on the displayed output. There are a bunch of examples at the official Rak site. Read More

By Peter Cooper / December 3, 2007

Almost a year ago, Antonio Cangiano performed some benchmarks on the then present Ruby implementations: Ruby 1.8.5, YARV (now Ruby 1.9), JRuby, Ruby.NET, Rubinius and Cardinal. The results were that YARV, although nowhere near ready for production use, was streets ahead of Ruby 1.8, and the other implementations raised enough errors to still be considered ‘experimental’.

Now Antonio has rerun the tests on Ruby 1.8.6, Ruby 1.9 (from trunk), JRuby (from trunk), Rubinius (from trunk) and XRuby 0.3.2. Ruby 1.9 again takes the lead by quite a margin, but the best development is that instead of being a distant third (behind Ruby 1.8), JRuby has made significant improvements and is smack bang in between Ruby 1.8 and Ruby 1.9 in terms of performance (while offering, of course, the benefits of the Java ecosystem). Read More

By Peter Cooper / December 3, 2007

I love finding a library that does exactly what it claims to do, and does it in the simplest way possible. Faker by Ben Curtis is a Ruby library, packaged as a Ruby Gem, that generates “fake data” for you, in the form of names, telephone number, e-mail addresses, addresses, and so forth.

For example:

Faker::Name.name # =”Gwendolyn Wehner”
Faker::Internet.email # =”ava.conn@emmerich.info”
Faker::Internet.free_email # =”angelina.labadie@hotmail.com”
Faker::Internet.user_name # =”mitchel.heaney”

This could be particularly useful for throwing data at any libraries or systems you develop that need to process personal details.

I had trouble installing Faker in the usual way (with gem install faker) as the Ruby Gems server reports that the file could not be found. Read More

By Peter Cooper / December 3, 2007

Troubleshooting Ruby Processes is a “digital short cut” (i.e. an e-book) written by Philippe Hanrigou and published by Addison Wesley. Unlike most Ruby books, my own included, this one really digs into its topic and looks quite low down at how Ruby processes interact with the operating system. While some of the topics are deep, however, the book is only 56 pages long, so it’s a useful book to read to learn why problems occur and which tools to solve the problem, even if you’re not going to be able to write a dissertation about it. Tammer Saleh of Thoughtbot wrote a review if you want to learn more. Read More

By Peter Cooper / November 30, 2007

Amazon EC2 (Elastic Compute Cloud) Control Library

amazon-ec2 is a super slick library that makes it super-easy to control Amazon EC2 instances in Ruby code. It also comes with a special shell “ec2sh” that gives you a much nicer (in my opinion) interface to control and manipulate EC2 instances than the usual command line tools provided by Amazon. The documentation for this is superb with examples of using all of the various methods it provides, ec2sh, and examples of EC2 control from Ruby and Rails apps.

RubyWorks Production Stack on Amazon EC2

Continuing with the Amazon EC2 theme, Nutrun posts about rubyworks-ec2, a set of Capistrano recipes and utilities to deploy the Rubyworks Production Stack (a complete Ruby and Rails stack) on Amazon EC2 instances. Read More

By Peter Cooper / November 29, 2007

The following article is a guest article written by John Philip Green of Savvica, a Toronto based educational technology company whose development efforts are focused on Ruby and Rails.

Hiring Rails full-time Rails developers is hard. Here’s why:

  • Surging demand. You will likely fight other companies for every recruit.
  • $100/hour++ freelance consulting rates are commonplace.
  • It’s hard to evaluate candidates. In the Java or .NET world, number of years of experience is relevant, but not here. The framework is only 3 years old.

I’ve hired ten full-time Rails developers into startups so far in 2007, but to do that I’ve had to interview hundreds and learned a lot of lessons. Read More

By Peter Cooper / November 27, 2007

Ruby 1.9 is almost upon us! With an expected release date around this Christmas, it won’t be long until you can start to play with Ruby 1.9 and enjoy some of the much-hailed performance increases (not to mention features).

“But I want it now!” you say. Well, as an open source project with an active ruby-core community working on a public code repository, it’s totally possible to get yourself a copy of Ruby 1.9 and begin playing with it today. You can’t expect to run production code on it and you shouldn’t expect any code to be rock solid, but with the release date such a short time away, you might find it feels “close enough” now for you to really get knee-deep in the new features, and you know how great it’ll be to pull out some great new techniques later on when the rest of your co-workers are still upgrading.. Read More

By Peter Cooper / November 27, 2007

Tim Bray presents “Ruby Survey Results,” the results of a survey of 1000 Ruby developers on their favorite development tools, primarily focusing on editors / IDEs. In the category of Rails-focused developers, 38% of the vote went to TextMate, with vi, NetBeans and Eclipse lagging far behind. With Ruby-focused developers, however, vi edged out TextMate by a single vote, with TextMate, Emacs and Netbeans as runners up. With all results tallied together, however, TextMate took a healthy lead on vi, and cements its position as the #1 preferred development tool of Ruby developers overall. Read More

By Peter Cooper / November 27, 2007

RubyInject is an intriguing new tool that can “inject” a Ruby interpreter into any running OS X application. Why? Well, along with RubyCocoa it allows you to interact with an application “from the inside.” If you’re a RubyCocoa aficionado you can probably think of a few cute tricks to use this for already. If not, then just think about AppleScript on acid. All of this fun and games does require OS X 10.5 (Leopard), however. Read More

By Peter Cooper / November 23, 2007

Notrails
Ramaze is a simple, light weight (in a good way!), modular Web framework developed in Ruby. Like Rails, and unlike some of its newer competitors, such as Sinatra, Ramaze sticks to the MVC (Model, View, Controller) paradigm, making it more like a lighter, more modular Merb-alike. Ramaze is already a year old, and one thing that the official Ramaze Web site does right is provide lots of example code and documentation. The framework has also seen four releases in the last six months, a sure sign that someone cares about it.

Inspired by Ruby Inside’s recent post, “Reprise: A Ruby-Powered Blogging App in 100 Lines Including Templates,” Aman Gupta, one of the developers of Ramaze, has converted the code from a Sinatra-based non-MVC format over to the Ramaze equivalent, so you can get a direct comparison of the two different approaches by reading two sets of code for the same application. Read More

By Peter Cooper / November 23, 2007

Tiobenov2007
The TIOBE “Programming Community Index” chart for November 2007 has been released and Ruby has climbed one place from #10 to #9, overtaking JavaScript in the process. The TIOBE chart is not a particularly accurate chart of programming language use, but it provides a data point used by many. Over the last two years we’ve watched Ruby scale quite a few places.

(Credit for noticing this: Akita on Rails – a top Brazilian / Portuguese Rails blog) Read More

Recently Popular Posts