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

By Peter Cooper / June 1, 2007

Osxguirubycocoa

Erik Kastner has put together a great tutorial showing you how to build a graphical OS X app using Ruby and RubyCocoa. For a less wordy approach, there’s also a short screencast which shows you the whole process from start to finish.

With the continual improvements of the RubyCocoa library, and Apple’s commitment to Ruby for Cocoa development in OS X 10.5, Ruby is rapidly becoming a viable alternative to Objective C and Java for developing OS X apps.
Rubycocoacom

Another great resource is RubyCocoa.com, a site that features several RubyCocoa tutorials and articles. Read More

By Peter Cooper / June 1, 2007

Looking at the stats from the Ruby Inside Job Board, the best position, so far, got 114 applicants from Ruby Inside readers. Wow! So if you want your job to be seen by thousands of hardcore Ruby and Rails developers, consider posting. Only one new job made it to the Ruby Inside Job Board in May, but it’s a good one!

Affinity Labs is looking for a Rails developer to work in downtown San Francisco with competitive pay, stock options, health and dental cover, etc. Ideally they’re hoping for a strong knowledge of Ruby, Rails, ERB, AJAX, RJS, YAML, REST and Capistrano.. Read More

By Peter Cooper / May 30, 2007

Matthew Bass has written a tutorial, published by InfoQ, called “Automating File Uploads with SSH and Ruby.” It provides an in-depth look into building a small Ruby script that can backup files to a remote machine over SSH using the Net-SSH and Net-SFTP libraries. It goes into quite some depth, and provides source code for a recursive backup script. If you haven’t had a dig into the Net-SSH and Net-SFTP libraries yet, it’s worth a look to see how the basics work. Read More

By Hendy Irawan / May 29, 2007

Autotest_red_green

ZenTest is a bundle of useful time-saving tools created by Ryan Davis to make the process of testing your applications faster and more effective:

  • zentest automatically writes your missing code based on simple naming rules.
  • unit_diff compares expected results from actual results and allows you to quickly see exactly what is wrong.
  • autotest continuously runs in the background, running relevant tests as soon as you modify a file. It’s probably the most popular component of the ZenTest package. With RedGreen, you’ll even get colorized tests!
  • multiruby runs anything you want on multiple versions of ruby. Great for compatibility checking!
  • Test::Rails provides even more comprehensive testing support for your Rails projects.
  • Read More

By Peter Cooper / May 29, 2007

Facebookplatform

FaceBook, a popular social networking site, recently announced the availability of an API, allowing third party developers to build tools, apps, and systems that integrate with FaceBook and which FaceBook users can use from within their accounts. MySpace users, who are used to copying and pasting crazy blocks of HTML into their profile foxes, will be aware of what a big deal this is.

Hot on the heels of this announcement, Matt Pizzimenti has updated RFaceBook, a Ruby library for integrating with FaceBook, to support various features of the API. It’s not something I’m likely to use, or that I fully understand, but the initial response to RFaceBook appears to be incredibly positive, so if FaceBook is your cup of tea, check it out. Read More

By Hendy Irawan / May 27, 2007

Rack, recently announced at version 0.2 by Christian Neukirchen, is a minimal, modular and adaptable interface for developing Ruby web applications. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call.

A simple Rack application looks like this:

class HelloWorld
def call(env)
[200, {"Content-Type"=>"text/plain"}, ["Hello world!"]]
end
end

If you ever think Rails is a bit overkill for some of your projects, you might just really like Rack. It supports web frameworks such as Camping, Ramaze, Maveric, and Racktools::SimpleApplication. Read More

By Peter Cooper / May 26, 2007

Blink and you’d miss it, but Ruby Inside celebrates its first anniversary today. To commemorate it, I want to post about the history of the site, how it all came together, present some statistics, and give some blog-related tips for anyone else who wants to create a similar blog.

Why?

51J3Rnl9Fal. Aa240

Ruby Inside was initially conceived as a promotional vehicle for my then-nascent Beginning Ruby book, now published by Apress and available from all good bookstores (and some bad ones, I imagine). The idea was to produce a blog suited towards casual or beginner Rubyists, the ideal market for the book, but as the subscriber count sharply grew through 2006, Ruby Inside gradually became a general-purpose publication for all Rubyists. Read More

By Hendy Irawan / May 24, 2007

Classifier is a Ruby gem developed by Lucas Carlson and David Fayram II to allow Bayesian and other types of classifications, including Latent Semantic Indexing.

Bayes classifier is a probabilistic algorithm which apply Bayes’ theorem in order to learn the underlying probability distribution of the data. One popular use for this is implemented in most spam filtering packages.

It can also be applied to many other cases of machine learning to make your Ruby application more intelligent (the complicated implementation is transparently handled for you, thankfully!) Ilya Grigorik recently posted an interesting tutorial on Bayes classification, with an easy-to-follow demonstration on how to use it for distinguishing between funny vs. Read More

By Peter Cooper / May 22, 2007

Andrzej Krzywda has put together a solid, 15 point tutorial on how to build a Rails application from the ground up using Test Driven Development (TDD) techniques. This is pure gold because so few of the books and “how to build a blog in 5 minutes” type articles bother to cover testing and Andrzej shows how to get into the habit from almost the first step. Read More

By Hendy Irawan / May 22, 2007

Handshake, currently in version 0.3.0, is an informal design-by-contract system written by Brian Guthrie in pure Ruby. It’s intended to allow Ruby developers to apply simple, clear constraints to their methods and classes.

Handshake is definitely welcome alongside the ever-increasing number of test-driven and behavior-driven design/development based tools, such as RSpec and test/spec.

Some examples of Handshake contracts (from its documentation):

# An array that can never be empty.
class NonEmptyArray < Array
include Handshake invariant { not empty? }
end

# An array to which only strings may be added.
class NonEmptyStringArray < NonEmptyArray
contract :initialize, [[ String ]] => anything
contract :<<, String => self
contract :+, many?(String) => self
contract :each, Block(String => anything) => self
end

Visit Handshake project page and Rdoc documentation for more information. Read More

By Peter Cooper / May 20, 2007

Scaling

Scaling a Rails Application from the Bottom Up was a presentation by Jason Hoffman, CTO of Joyent. The PDF of the presentation has a mega 192 slides and touches on a ton of interesting stuff about scaling and deployment (all the way down to hash based filing).

Forkoff

Angels & Daemons (PDF of slides) was a presentation by Tammer Saleh of Thoughtbot, Inc that went into the details of building daemons and how to daemonize processes in Ruby. The PDF on its own is pretty useful.
Hcapistrano

Harnessing Capistrano came from Jamis Buck of 37signals. The presentation is reasonably heavy on practical knowledge and will be of use to Capistrano newcomers. Read More

By Peter Cooper / May 20, 2007

Rspec-1

The RSpec development team have just announced the release of RSpec 1.0, the first major version of what has become a popular “Behavior Driven Development” library for Ruby.

If you’re fresh to RSpec, check out the official home page for a compelling example, or straight from the mouths of the RSpec team:

RSpec provides a Domain Specific Language for describing and verifying the behaviour of Ruby code with executable examples.

Some people like to call these examples “tests”. In fact, they are. But we believe that tests have equally important value as documentation and as a design aid, and that the testing nomenclature and syntax in most unit testing frameworks keep too much focus on only the testing value, and hide the design and documentation value. Read More

By Hendy Irawan / May 18, 2007

Twitter-1

You’ve heard of Twitter, an online service that allows you and your friends to communicate up-to-the-second by sending short messages. Twitter has built-in features to deliver the updates to your instant messaging account (such as Google Talk) or to your cell phone. Yesterday we covered real-time Flash visualization of RailsConf twitters.

Want to incorporate Twitter functionality into your own projects? Enter the Twitter gem by John Nunemaker. Observe:

# to post an update to twitter
$ twitter post “posting from the twitter gem”

# to see you and your friends timeline
$ twitter timeline

The command line interface is very simple, and configuring it is easy using a YAML file. Read More

By Peter Cooper / May 17, 2007

Railsconftwitter

Twitter is a current flavor of the month Web 2.0 site where you can post small messages and receive small messages sent by other people online or via SMS. It’s pretty cool and it’s become extremely popular in the last few months. Lots of Rails and Ruby developers are using it to keep each other in the loop with what’s going on in their lives. This, coupled with the ability to read “up to the second” messages about what’s going on and the start of RailsConf today, means it’s an ideal candidate for a Flash visualization of on-the-fly RailsConf updates. Read More

By Hendy Irawan / May 17, 2007

Gibberish is a Rails plugin developed by Chris Wanstrath which provides a hassle-free text translation capability for your Rails applications. The first application to use it is the Beast forum system.

Most localization tools use either key-string or original-message based translation. Gibberish strikes the balance between these techniques. Consider:

<%= “See you!”[] %>

By default, the translation keys use lowercase and underscored version of the original message, but a key can be provided as a symbol within the [] construction. Translation files are made up of simple YAML. An example id.yml for the above message would be:

see_you: Sampai jumpa!

If you’re wondering about parameters in a message (e.g. Read More

Recently Popular Posts