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

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

By Peter Cooper / December 20, 2010

tr3w.pngThe Rails 3 Way is the much awaited, Rails 3-focused followup to The Rails Way, a popular Rails book (and, dare I say, bible) by Obie Fernandez. It features forewords by David Heinemeier Hansson and Yehuda Katz and checks in at a desk-thumping 759 pages of full-on Rails 3 goodness (despite the book sites claiming 850 pages). I’ve given it the once-over.

My General Conclusion

The Rails 3 Way is an interesting book representing a large amount of effort digging into Rails 3. It shares insights and technical knowledge you’d struggle to patch together from blog posts and documentation. It’s a very opinionated book and will not be to everyone’s taste. Read More

By Peter Cooper / December 15, 2010

cooldude.pngBeen missing esteemed rapper and author Coolio (real name Tony Arcieri) recently? He’s been busy studying Ruby and building Cool.io (or GitHub repo), a Node.js and Sinatra inspired “event framework” for Ruby powered by libev. Think EventMachine but with a cuter, Sinatra-style API. cool.io isn’t exactly new, though, it’s a rewrite-meets-rebrand of Rev (which started life back in 2007).

You can install cool.io with gem install cool.io (it just feels weird to have a period in a gem name, no?) and be up and running quickly with cool.io’s default example script:

require ‘rubygems’
require ‘cool.io’

ADDR = ’127.0.0.1′
PORT = 4321

cool.io.server ADDR, PORT do
on_connect do
puts “#{remote_addr}:#{remote_port} connected”
end

on_close do
puts “#{remote_addr}:#{remote_port} disconnected”
end

on_read do |data|
write data
end
end

puts “Echo server listening on #{ADDR}:#{PORT}”
cool.io.run

This program listens on localhost at port 4321, accepts connections, and echos data back to them. Read More

By Peter Cooper / December 14, 2010

rwind.pngAs 2010 comes to a close, I’ve dug through Ruby Inside archives to remind myself how far the Ruby scene has progressed over the year. Over the past couple of years, it’s been hinted that the pace of developments in the Ruby world is slowing down, but nothing could have been further from the truth in 2010 (well, except in September..)

Let’s take a spin through the year’s biggest Ruby news!

January

CoffeeScript Released: A New Language With a Pure Ruby Compiler – If you’re into JavaScript development at all, you must have heard of CoffeeScript. It’s an alternative syntax for JavaScript that compiles down into regular JavaScript that can run anywhere. Read More

By Peter Cooper / December 14, 2010

apple-ruby-3.jpgMacRuby team lead and Apple employee Laurent Sansonetti has unveiled MacRuby 0.8, the latest release of the Ruby 1.9-compatible Mac-focused Ruby implementation. The main MacRuby site hasn’t been updated at the time of writing but you can get MacRuby 0.8 now from the MacRuby files folder or direct at http://www.macruby.org/files/MacRuby 0.8.zip

0.8 follows on swiftly from the MacRuby Bug Smash held on IRC on Saturday 4th December. Given this, 0.8 is primarily a bug fixing release with more compatibility and stability fixes than you could shake a bacon-coated stick at. Some enhancements have been made to MacRuby’s Cocoa development support (a post on the official MacRuby blog is due soon) and macirb now supports auto-indentation and completion. Read More

By Peter Cooper / December 12, 2010

meet-rails-3.png Ruby screencasting supremo Geoffrey Grosenbach has unveiled PeepCode’s new Meet Rails 3 series. There are two parts so far, clocking in at 75 and 92 minutes respectively – they’re $12 each or “free” if you have a PeepCode Unlimited subscription.

Geoffrey has pulled out all of the stops to produce his slickest and best produced screencasts yet. Striking effects abound and he’s perfected the art of producing memorable yet straightforward diagrams to demonstrate the points he makes. This is a great way to get onto the Rails 3 wagon if you haven’t yet tried.

Straight from the horse’s mouth:

He also notes that PeepCode is also selling Jeremy McAnally’s fine “Rails 3 Upgrade Handbook” which we reviewed on Rails Inside a while back. Read More

By Peter Cooper / December 9, 2010

James Golick, a prolific Canadian Rubyist, has declared war on Net:HTTP’s default of not checking the validity of the certificate sent by an HTTP server when making HTTPS requests. His new always_verify_ssl_certificates gem forces Net::HTTP to verify SSL certificates and doesn’t allow other libraries to override this setting.

Despite being a known issue for years, James explains why Net::HTTP’s default setting could be leaving you open to security problems:

While there’s a potential for man-in-the-middle attacks when using Net::HTTP to connect to HTTPS sites, the chances are low, and if you’re not doing anything that needs to be airtight (say, local development work), you might not need to use James’ solution (or if you’re using open_uri). Read More

By Peter Cooper / December 8, 2010

anteater.pngTechCrunch reports that Salesforce.com is to acquire the popular Heroku Ruby app hosting service for approximately $212 million in cash. We first posted about Heroku back in November 2007 (18 months before it even went commercial) and since then they’ve gone from strength to strength. Congratulations to the team!

Despite being under embargo with Salesforce on the recent Database.com story and being alerted to almost every other Heroku story in the last few years, TechCrunch obviously got an exclusive so read that for the details, read this Hacker News thread for some smart discussion, and read Heroku’s own impressions on what the sale means for them and their customers (in short, Heroku will remain quite independent within the Salesforce.com ecosystem and the brand will live on). Read More

By Peter Cooper / December 7, 2010

databasecom.pngMany infrastructure companies have recently adopted a drip-feed pricing model – consider renting servers from Amazon EC2 or monitoring our servers with New Relic RPM. The cloud database industry is still in its infant stages but today Salesforce.com has kicked things up a notch in offering all of its enterprise-scale database technology in a new cloud database service, Database.com.

Last week, engineers at Salesforce gave me a briefing and ran through the system. I was impressed. With its public API and networked nature, Database.com is truly Ruby friendly and the ActiveSalesForce adapter for ActiveRecord can get things running quickly if you’re an ActiveRecord user. Read More

By Peter Cooper / December 7, 2010

It’s time for us to thank the companies who help keep Ruby Inside going by kindly sponsoring our work in return for a little community love. Luckily, they’re all interesting in their own right and have some worthwhile products to check out – no CashForGold or dating sites here!

New Relic — On-demand Application Management

New Relic is a Java and Ruby application performance and reliability monitoring and management service that started life as a Rails-only service (and it’s still great for that!). It’s truly enterprise-grade software but with the flexibility and accessibility of annual, monthly, or “on demand” pricing, catering to nearly all types of customer. Read More

By Peter Cooper / December 6, 2010

Summarize is a new Ruby library that provides bindings to the C-based Open Text Summarizer library. It’s an ideal way to get a “summary” of a document and esteemed Rubyist Jeremy McAnally used it in his RailsRumble-winning app TLDR.it.

Once installed (gem install summarize – if you’re lucky and have the dependencies), Summarize is easy to use since it adds a summarize method to the String class:

your_string.summarize(:ratio =25)

In this case, Summarize returns a summary approximately 25% of the length of the original string in your_string. Read More

By Peter Cooper / December 6, 2010

finches.pngSignificant and serious improvements to the core Ruby language come along as infrequently as TextMate updates. Given that TextMate has had an update recently, an important new Ruby feature was sure to be just around the corner and it is: refinements! Shugo Maeda (who works with Matz and developer of mod_ruby) presented the idea at RubyConf 2010 last month.

In a nutshell, refinements clear up the messiness of Ruby’s monkey patching abilities by letting you override methods within a specific context only. Magnus Holm has done a great write up of the concepts involved, and presents a good example:

module TimeExtensions
refine Fixnum do
def minutes; self * 60; end
end
end

class MyApp
using TimeExtensions

def initialize
p 2.minutes
end
end

MyApp.new # =120
p 2.minutes # =NoMethodError

In this example, rather than adding the minutes method to the Fixnum class in the typical way, it’s been added as a “refinement” within a module which is then used elsewhere to spread the context of the change. Read More

By Peter Cooper / November 29, 2010

rubymine.png JetBrains (of IntelliJ IDEA fame) has today released RubyMine 3.0, the latest version of its cross-platform Ruby and Rails IDE. It follows on almost 18 months to the day from RubyMine 1.0. Back then we noted that the public reception of RubyMine was strong and JetBrains have only made it better since then.

If you’re not already familiar with RubyMine, it’s a cross-platform Ruby and Rails IDE based upon IntelliJ IDEA (to me it’s always seemed faster than the Eclipse-based IDEs) that runs on Windows, Linux, and Mac OS X. It comes with a custom Ruby debugger, as well as version control integration (SVN, Git, Perforce and CVS) and support for several test systems out of the box (specifically RSpec, Cucumber, Shoulda, and Test::Unit). Read More

By Peter Cooper / November 26, 2010

rubydrop.png Ever used Dropbox? It’s awesome. A cross-platform (Windows, Mac, Linux, and even mobile) file syncing and backup service with 2GB for free (or 2.25GB if you sign up with this link). Well, if you’d like to roll out your own system on your own infrastructure, send some thanks to Ryan LeFevre, the creator of RubyDrop, an open source Dropbox clone based on Ruby and git.

Cloning Dropbox sounds like a tall order and in reality, “Dropbox clone” is a big stretch. RubyDrop is quite simple under the hood and focuses on the file syncing part of the problem. Read More

Recently Popular Posts