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

Author Archives: Peter Cooper

By Peter Cooper / June 9, 2010

Rails activist Gregg Pollack (of Ruby5 and RailsEnvy fame) has put together several new screencasts highlighting new Rails 3 features for the official Rails homepage. They’re all about 10 minutes long and cover topics like Action Dispatch, Action Mailer, Bundler, JavaScript integration and Action Controller. Read More

By Peter Cooper / June 9, 2010

Alex has clearly put a ton of effort into this. Despite being cross-platform, though, don’t get too excited if you plan to target Windows.

An interesting by-product of Bowline is rbyte, a Ruby 1.9.(1|2) library that “compiles” Ruby 1.9 source down to byte code and makes it easy to reload and use said code. Read More

By Peter Cooper / June 9, 2010

Tonight, Ruby Inside has changed for the better. If you’re reading on the Web, it will be immediately apparent, but if you’re reading via the feed, check out RubyInside.com. Ruby Inside is no longer a magazine-style blog – it’s a Daring Fireball-style tumblelog.

Why?

If you’ve been following Ruby Inside for a year or more, you might have noticed a severe slowdown in posts here over the last several months. This was down to a combination of being busy working on my startup, coder.io, and, frankly, being a bit burnt out writing posts every day for Ruby Inside. Read More

By Peter Cooper / June 1, 2010

The latest installment of my series of roundup posts, covering some of my latest findings in the world of all things Ruby. Why two “tidbits” posts in a row? Well, I’m radically redesigning/reworking Ruby Inside to be more interesting, both to you and me. This coupled with work on my new startup coder.io have reduced my available time a lot but, rest assured, everything will be crazy on Ruby Inside again within a week or so :-)

For now, enjoy!

DataMapper 1.0.0 RC3 Released

The third release candidate of popular Ruby ORM DataMapper has been released. I’ve become a bit of a MongoMapper and Redis guy myself lately, but ORMs like DataMapper and Sequel provide great alternatives to the ever-popular ActiveRecord ORM. Read More

By Peter Cooper / May 20, 2010

The latest installment of our series of roundup posts, covering some of our latest findings in the world of all things Ruby (or not). These items wouldn’t make it in as separate posts, but they should be of enough interest to Rubyists generally to make it a worthwhile browse for most readers.

Active Record “Intellisense” for TextMate

If you’ve used Microsoft’s Visual Studio development tools at all, you’ll be familiar with Intellisense, a powerful autocompletion tool. Carlos Brando (of Ruby Inside Brazil) has written in with news of a pseudo-Intellisense system for ActiveRecord users using TextMate. There’s a YouTube video that shows the system in action. Read More

By Peter Cooper / May 18, 2010

Rubinius or GitHub repo, an alternative Ruby implementation that’s built in Ruby itself – as much as possible, has this last weekend hit the coding equivalent of a Bar Mitzvah.. its 1.0 release! Congratulations to the Rubinius team, past and present, and everyone who has helped with its release – I didn’t know if you were going to make it for a moment there..

The Why: The History

Back in 2006, Geoffrey Grosenbach (of PeepCode) claimed to have made a bet by donating $1,000 to the then-new Rubinius Ruby implementation project founded by Evan Phoenix. It seemed more like an act of charity at the time, but Geoffrey had the last laugh in securing the naming rights to Rubinius 1.0, also known as Fabius. Read More

By Peter Cooper / May 13, 2010

Need a new Ruby or Rails job? They’re getting posted daily on jobs.rubynow.com but we’ve got 8 special ones of our own that have come in via the Ruby Inside jobs board. Jobs this month come from the United Kingdom and the US and, as is proving typical, are Rails heavy.

Ruby on Rails Developer (San Francisco, California)

SideReel is a fast-growing Web site with millions of users that aims to be the center of the online TV world! They are looking for an experienced Ruby on Rails software engineer to help build a community-based site focused on helping people find entertainment online. Read More

By Peter Cooper / May 12, 2010

Following on five months after the release of the popular JRuby 1.4, the JRuby team have delivered JRuby 1.5!

Forgetting the de facto “official” Ruby implementations of 1.8.x and 1.9.1/2, JRuby is the fastest and most stable Ruby implementation available and already has 9 years of progress under its belt. JRuby takes a lot of its performance and versatility from running on the Java Virtual Machine (JVM), which has provided JRuby’s developers with a solid base from which to optimize how Ruby is implemented.

JRuby 1.5.0′s release notes provide the full detail, but essentially the biggest new features are:

  • Native launcher for UNIX-based platforms
  • Ant support (effectively a Java based built tool, a la make)
  • Rails 3 related fixes
  • Updates to the standard library, RubyGems, and RSpec
  • ruby-debug is now included
  • Significantly improved Windows support (a breath of fresh air for Windows-based Ruby developers used to getting second best in the Ruby world)
  • Overall performance improvements

I don’t use JRuby in production myself, but everyone I know who does attests to its stability and performance. Read More

By Peter Cooper / May 7, 2010

Pusher is a new Web service from New Bamboo that makes it easy to push data to users of your web applications “live”, outside of the request response cycle. They’ve embraced Web Sockets technology and built a REST API to which you can post events. Its flexible channels are based on a publish/subscribe model and you can send events as JSON which communicate with all connected browsers.

Websockets are part of the specification for HTML5, and are essentially long-running native TCP connections in the browser. These allow a client to establish a connection to a server, and have immediate feedback when there are events they need to be notified of. Read More

By Peter Cooper / May 5, 2010

Dropbox is a popular file hosting service (4m+ users) that provides synced backup and file hosting to OS X, Windows, and Linux users. You get up to 2GB of space for free. RDropbox is a library by Tim Morgan (of Autumn fame) that takes advantage of the official Dropbox API from Ruby.

With RDropbox you can log into a Dropbox account using OAuth and then upload and download files. A requirement, however, is that you apply for Dropbox API access and are approved, as the API is not fully open to the public without going through the approval process (this appears to be in order to avoid overloading their service). Read More

By Peter Cooper / May 5, 2010

In the UK there’s a cliché that goes: “You wait hours for a bus, and then three come along at once!” So it went with these three Ruby date and time libraries. They all made an appearance on RubyFlow last week and are all useful in their own ways, depending on how you’re working with dates and times.

ice_cube – Fast querying and expansion of event recurrence rules

ice_cube is a library by John Crepezzi that provides “fast querying and expansion of recurrence rules in Ruby.” What this means is that you can create schedules powered by date recurrence rules that can be quite complex (e.g. Read More

By Peter Cooper / April 28, 2010

When you want to inspect your objects in Ruby, Object#inspect, p, or awesome_print are all valuable. You’re stuck with plain-text, though, and primarily designed to look at object data rather than object models. If you want to drill down into parent classes, see object and class relationships, etc, then, check out DrX, a visual object inspector for Ruby!

DrX bills itself as a “small object inspector”, but its key features are that it shows results visually (in a GUI interface) and that it focuses on showing the object model behind your objects, rather than the data contained within. A visual example of a DrX session should give you the idea:

Usage

Once DrX is installed (more on that in the next section), you just require ‘drx’ it into your app (or even within irb) and then use the Object#see method to get DrX into action:

require ‘drx’
123.see

Even this rudimentary example will bring up an interesting graph. Read More

By Peter Cooper / April 28, 2010

Nestful is a simple HTTP/REST client library for Ruby, developed by Alex MacCaw (of Juggernaut) fame. Nestful allows you to consume basic Web services easily, usually in a single line of code. It can deal with JSON, buffered downloads, and callbacks out of the box.

HTTParty is the current, de-facto simple HTTP/REST client library used by most Rubyists (when net/http won’t do or when Typhoeus is too overkill) but Nestful differs enough from HTTParty to live alongside it. While HTTParty encourages you to build up some structure and separate the types of resources you’re accessing into classes (that HTTParty then extends), Nestful offers a simpler, “just call a method from anywhere” approach. Read More

By Peter Cooper / April 27, 2010

Cinch (or GitHub repo) is a new Ruby “microframework” for creating IRC bots. Effectively, Cinch is a library that both abstracts away all of the complexities of dealing with IRC servers and presents a DSL for rolling out your own functionality.

Cinch’s Hello Bot example demonstrates how you can easily create a bot that connects to an IRC server (irc.freenode.org), joins a channel (#cinch) and then replies to greetings:

irc = Cinch.setup :verbose =true do
server “irc.freenode.org”
nick “Cinchbot”
channels %w(#cinch)
end

irc.plugin “hello” do |m|
m.reply “Hello, #{m.nick}!”
end

irc.run

Cinch isn’t the first attempt at building a DSL for creating bots in Ruby. Read More

By Peter Cooper / April 20, 2010

Coderpath is a weekly podcast by Ruby developers Miles Forrest and Curtis McHale where they typically interview a different Ruby developer and discuss some of their current work. Most of the episodes are in an interview format and guests so far include a handful of Ruby developers you’ll know (such as DHH and Ryan Bates).

The latest episode is a 35 minute interview with Wayne E Seguin, the developer of Ruby Version Manager. Before that was yours truly, sounding like a total crackhead. Coming up next week is Obie Fernandez of HashRocket.

Here are the episodes so far:

Naturally, you can subscribe via iTunes or use their direct podcast feed with your favorite podcatching software. Read More