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

Author Archives: Peter Cooper

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

By Peter Cooper / November 21, 2007

jRails – Seamlessly Redefines Rails Helpers to Use jQuery Instead of Prototype

jRails is an intriguing Rails plugin that makes it extremely easy to switch from using the Prototype JavaScript library that comes with Rails to the increasingly more popular jQuery. From most of the reports I’ve seen, jQuery is faster and I’ve seen several blog posts just in the last week that emphasize just how much easier and concise jQuery code is (it’s not hard to find these reports, if you’re interested). The only downside to jQuery is that all of Rails’ helpers are written to use Prototype.. but jRails solves that by redefining how they work so that they work with jQuery instead! Read More

By Peter Cooper / November 20, 2007

Nokiatablet

This isn’t really “news” but it’s Ruby related and struck me as rather odd. I was just browsing Amazon.co.uk, doing some Christmas shopping, and came across a Nokia Internet Tablet with GPS (not an affiliate link) for only £139.99. I looked at the provided pictures of the device and was struck by the one above. It’s a picture of a Ruby and you can just about make out “www.ruby-lang.org” written on the location bar of the device. This seems pretty weird on a mass market device, especially since they’ve gone to the trouble of putting a picture of a Ruby in the shot, rather than the real Ruby homepage. Read More

By Peter Cooper / November 19, 2007

Wuby
Wuby, developed by Chris Matthieu, is a new light-weight Ruby Web application framework, much in a similar vein to Sinatra or Camping.
One of the differences of Wuby is that no third party applications or gems are required to run Wuby apps, and the Wuby library itself contains everything necessary to run an HTTP daemon and start serving requests. The wuby.org site itself is running on the Wuby system and certainly seems to serve up pages extremely quickly. No database connections are required (although MySQL and SQLite are easily usable), and data can be stored in a persistent hash for ultra simplicity. Read More

By Peter Cooper / November 17, 2007

Aac2
Robert Dempsey of non-profit Rails advocacy group, Rails For All, writes in to remind everyone about the acts_as_conference Rails conference taking place in Florida in February 2008 and to let us know that registration is now open. Tickets cost $100 (plus $2.50 booking fee). Obie Fernandez and Dan Benjamin are the keynoter speakers, but there are many others. Too many to name individually here, although Charles Nutter (JRuby), Ezra Zygmuntowicz (Merb), and Evan Phoenix (Rubinius) are particular standouts. Anyway, if you fancy getting some winter sun while doing the Rails schmooze, hit it up. It doesn’t sound like you’re going to be bored at this one. Read More

By Peter Cooper / November 17, 2007

Rd
Ryan Davis starting off the RejectConf proceedings (License: CC ASa)

Just learned via Michael Riley on Twitter that the videos from the 4th RejectConf held alongside RubyConf 2007 are available to watch online. There are plenty of good presentations to watch, such as Dr. Nic Williams’ introduction to Rubigen and Magic Controller, Tom Preston talking about GOD, and Eric Mills on rubedo – a Ruby powered jukebox. There are 20 different presentations you can watch (including Ryan Davis’ introduction) so there’s bound to be something you’ll find interesting. Being RubyConf’s RejectConf, the presentations are nearly all about Ruby-specific topics, rather than Rails. Read More