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

By Peter Cooper / January 26, 2011

cleveralgorithms.pngClever Algorithms is a newly released book by Jason Brownlee PhD that describes 45 algorithms from the Artificial Intelligence (AI) field with Ruby-based examples. It’s well produced and, notably, free in its PDF and online formats. A print copy is available at a small cost.

The book kicks off with a chapter of background regarding AI and its problem domains and moves on to an array of algorithms in the probabilistic, neural networking, stochastic, swarm, and evolutionary spaces.

Ruby purists will note that even though the demonstrations are in Ruby, they’re not very Ruby like. Classes are rarely defined and using methods defined in the main context as functions is the order of the day. Read More

By Peter Cooper / January 21, 2011

Rails Ready is essentially just a shell script but one you might find useful if you’re running Ubuntu (or – update – CentOS) and want to get the installation process done and over as quickly as possible. It follows on rather nicely to our last post: Ruby Installer: Ruby and Rails on Windows in a Single, Easy Install!

If you have the time or you’re installing this on your main development machine, however, I would recommend following Ryan Biggs’ RVM based instructions (or my equivalent screencast) because RVM gives you more developer-level control later on (such as gem sets). Read More

By Peter Cooper / January 18, 2011

railsinstaller.pngRailsInstaller is a new project from Wayne E Seguin (of RVM fame) that brings RubyInstaller-style simplicity to getting Ruby and Rails set up on Microsoft Windows (XP, Vista, or 7). In a single wizard-driven installation you get Ruby 1.8.7-p330 (with DevKit), Rails 3.0.3, Git, and SQLite 3.

Rails Installer was developed with help from Luis Lavena (a Ruby on Windows expert) and Dr. Nic Williams (Engine Yard’s resident Australian comedian) and its release comes just weeks after Wayne was (re)hired by Engine Yard to work on new open source initiatives.

To get started, go to, download the “Rails Welcome Kit” and run the installer. Read More

By Peter Cooper / January 13, 2011

webkit.pngEloy Duran (of the Dutch Rails consultancy Fingertips) has put together an interesting side project: a WebKit plugin written in MacRuby. His ‘MacRubyWebKitPluginExample’ project on GitHub is a short, self contained example of how to pull it off, so it’s worth checking out if you want to do something similar. Eloy’s example simply allows Ruby code to be supplied by a text box in a WebView and then executed by MacRuby on the back end.

Here’s a video showing it in action:

Before you get too excited, there are some significant provisos. Eloy explains:

So it’s early days, but these problems seem surmountable, and in the interim it could be a useful technique for those of you building MacRuby OS X apps with custom WebKit WebViews. Read More

By Peter Cooper / January 12, 2011

Screen shot 2011-01-12 at 2.32.49 AM.pngParslet is a new “simple parser framework” for Ruby built by Kaspar Schiess. It follows the PEG (parsing expression grammar) style of parsing and its primary goals are to be simple, testable, and to have extensive and powerful error reporting features (something that Kaspar states Treetop sorely lacks).

If you’ve already used Treetop, you might wonder what the hoopla is about. The key difference is that Parslet does not generate code to represent the parsing grammars you create as Treetop does – it works directly from rules defined using standard Ruby syntax (Treetop has its own Ruby-esque grammar language). Parslet’s error messages are also significantly nicer than Treetop’s when you inevitably run into trouble with your grammar as they’re generated by Parslet itself and don’t spring from Treetop’s internally generated code. Read More

By Peter Cooper / January 11, 2011

jruby-new-logo.pngThe JRuby team has announced the release of JRuby 1.6.0 Release Candidate 1. The final release is still a little way off but the bulk of the work is in place. It’s billed as the “largest release of JRuby to date” which, given how awesome 1.5 was, is a big deal, especially as it adds initial Ruby 1.9.2 language and standard library compatibility (though 1.8.7 is still the “default”).

So, what’s new?

  • Ruby 1.9.2 language and API compatibility (use the –1.9 command line option to get it)
  • Ruby 1.9.2 stdlib included (even in jruby-complete.jar)
  • General performance and stability improvements
  • RubyGems 1.4.2 included
  • Experimental C extension support (!)

The JRuby team are especially keen for people to try out the new Ruby 1.9.2 support so that they can round out and perfect their 1.9.2 compatibility before the final release. Read More

By Peter Cooper / January 7, 2011

ruby-core.pngYou may imagine that the ruby-core mailing list is a 24/7 programming disco dealing with core Ruby implementation topics.. but no, it’s usually a low-traffic list with calm discussion of bugs and patches. This week, however, some Interesting Stuff™ has happened and the kimono has been lifted on a few issues including, notably, a potential Ruby 1.8.8.

Yui Naruse, one of the core Ruby committers, was trying to dispel myths that the Japanese-language ruby-dev mailing list is a hotbed of illicit Ruby implementation activity by inviting people to ask any implementation-related questions they liked in ruby-core. From the results of this, we can pick up a few tidbits:

What’s going on with Ruby 1.9.1? Read More

By Peter Cooper / January 4, 2011

haha-funny.pngVCR is a library by Myron Marston that records your test suite’s HTTP interactions so that they can be quickly replayed during future test runs. The big win is that you get predictable, quick and accurate tests. If you need to update the data, just delete the fixtures VCR generates and you’re good to go.

On the surface, VCR sounds like it copies the work of libraries like FakeWeb and Webmock, but VCR uses those libraries to provide a cleaner, more abstracted experience. VCR supports the mocking features of FakeWeb, Webmock, Typhoeus and Faraday out of the box, and further, supports multiple HTTP client libraries including Net::HTTP, Typhoeus, HTTPClient, Curb, Patron, em-http-request and Net::HTTP-based clients like HTTParty, RESTClient and Mechanize. Read More

By Peter Cooper / January 3, 2011


At RubyConf X in November 2010, Aaron Patterson (a.k.a tenderlove) gave a 45 minute talk called ZOMG WHY IS THIS CODE SO SLOW? The video of this conference, as recorded by the always awesome Confreaks, is now online. It’s a must watch, if only to learn how he got commit access to both Ruby and Rails (a rare feat indeed). In the talk Aaron examines his work on Arel (as used to build up SQL queries in Rails 3.0) and how he boosted its performance, a topic he also covered in an October 2010 blog post.

The official synopsis:

Just go watch it folks. Read More

By Peter Cooper / January 3, 2011

codelesson.pngStarting January 10, 2011 (just one week after this post), I’ll be teaching an online Ruby course with – me being Peter Cooper, author of Beginning Ruby. It lasts 4 weeks and will cover most things a new Ruby developer (or programmer in general) needs to know to become a confident, intermediate-level Rubyist. It’s a great springboard from which to move on to Rails or other more advanced Ruby topics.

Naturally, the course is below the experience level of most Ruby Inside readers, but it might suit your boss, your new non-Ruby co-workers, or merely anyone you know who has some tech savvy and would find learning programming in Ruby a buzz. Read More

By Peter Cooper / January 3, 2011

jobs.pngIt looks like California’s the place to be if you’re a Rubyist or Rails developer looking for a full-time position right now. 6 of today’s 9 positions are in California with 5 of those in the Bay Area. Elsewhere, there are also positions in Texas, Illinois, and the UK. Good luck!

The Jobs

Solar Universe is looking for a Rails Developer in Livermore, California. Solar Universe is an interesting solar energy installation and financing company.

Spiceworks is looking for a User Interface Developer in Austin, Texas. Spiceworks develops social business applications. A degree in math, engineer, CS, or related field is preferred. Read More

By Peter Cooper / December 29, 2010

For better or worse, Ubuntu has become one of the most popular Linux variants on which to deploy Ruby and Rails apps. It was used for 84% of the 2010 Rails Rumble projects, for example. Back in 2009, I wrote a guide to installing a Ruby 1.8 stack on Ubuntu 8.10 so it was only a matter of time before I had to tackle 10.10 (Maverick Meerkat) and Ruby 1.9.

Tip: If you’re still on 1.8, check out The Ruby 1.9 Walkthrough, a mega screencast aimed at Ruby 1.8.7 developers who want to learn all about what’s new, what’s gone, and what’s different in Ruby 1.9.2 and 1.9.3. Read More

By Peter Cooper / December 28, 2010

Recently-minted Ruby webapp hosting gods Heroku and real-time “search as a service” provider IndexTank have teamed up to present the Heroku + IndexTank Application Contest. Prizes include an 11.6″ MacBook Air, a Lilliput Mini USB monitor, and an Electronic Rock Guitar shirt. It’s open to US developers only (boo!) and entries are due by January 6, 2011.

IndexTank is one of Heroku’s new add-on partners providing search-as-a-service to folks running apps on the Heroku platform. Essentially, it’s a giant “search in a box” service you can push data into and query in real-time. They worry about providing a search service just like Heroku worries about keeping your app running. Read More

By Peter Cooper / December 27, 2010

bauble.pngChristmas is a special time for Rubyists and not only for those of us taking the opportunity to get drunk and eat a lot. December 25 has been a popular release date since Ruby 1.0 was released on December 25, 1996 and several developers were preparing releases of their libraries and Ruby implementations this year too. So what December 25, 2010 bring?

Ruby 1.8.7 patchlevel 330

At 9am GMT on Christmas Day, Urabe Shyouhei posted the release announcement for the latest patchlevel version of Ruby 1.8.7 to the ruby-talk mailing list:

Intriguingly, he also noted that Ruby has changed license recently and this is the first release since the switch:

Ruby 1.9.2 patchlevel 136

The latest version of the production-ready Ruby 1.9.2 was announced by Yuki (Yugui) Sonoda who notes it fixes “many bugs” found in 1.9.2-p0. Read More

By Peter Cooper / December 22, 2010

rubinius.pngThree months on from the 1.1 release, Rubinius 1.2 has hit the streets bringing together 242 commits from 10 developers. As well as the typical bugfixes and performance tweaks that come with any implementation update, 1.2 brings some underlying structural changes that set up the path to getting better Windows support, Ruby 1.9 support, and the removal of the much-loathed GIL (Global Interpreter Lock) in future releases.

Documentation A Priority

1.2 also sees some leaps forward in the documentation department, led by Brian Ford of Engine Yard. There’s now multilingual documentation available on the Web in English, German, Spanish, Japanese, and Russian (but with many holes – that’s where your help is needed). Read More

Recently Popular Posts