Ruby

Backing Up Your Data With Fog

Fog, in case you haven’t heard of it, is a fantastic cloud computing library written in Ruby. It provides a unified interface to several popular cloud computing platforms(including Amazon, Rackspace, Linode, and others), making it easy to interact with them from Ruby. It currently supports four types of cloud services: storage, compute, DNS, and CDN. Fog has become very popular lately, and serves as the backbone for Chef’s cloud computing functionality, which is how I first became aware of it.

Generating Realistic Test Data With Ruby

Generating semi-realistic test data for an application can be a pain. If the data already exists, as in the case of an upgrade to an existing system, you can generally create data based on the existing database. But what if you need a large sample of data for a brand new system? If you have simple data requirements, there are some Ruby gems that can help you out. Faker is one such gem, which lets you generate realistic names, addresses and phone numbers.

A Collection of Great Tools for the Ruby Developer

I’ve been a bit heads-down lately, working on a super-secret project in Ruby. More on that in the near future, but in the meantime I wanted to share about a few things that I’ve started using. Shoulda When I started my new project, I wanted to try one of the new testing frameworks for Ruby. The problem is there are a number to choose from. What to do… I settled on Shoulda.

Is SwitchPipe the Solution for Rails Shared Hosting?

Peter Cooper (who I interviewed recently ) has just announced SwitchPipe, which aims to make deploying and hosting Rails (and other frameworks, such as Django) applications easy. From the site: Introduction / Overview\ SwitchPipe is a proof of concept "Web application server" developed in Ruby. More accurately, it's a Web application process manager and request dispatcher / proxy. Backend HTTP-speaking applications (Web applications) do not run directly within SwitchPipe, but are loaded into their own processes making SwitchPipe language and framework agnostic.

Rails Snippets - 11/29

Holy Shmoly, Ruby 1.9 smokes Python away Initial performance numbers would seem to indicate that Ruby 1.9 (due by Christmas) will be lots faster. Quoted-Printable: My .irbrc If you spend a lot of time in IRB (most of us probably do), it’s worth taking the time to learn how to customize it. This is a good start. Faker Nice clean library to generate fake data. The home page says it’s a port of Perl’s Data::Faker library, which I’d never even heard of.

Rails Snippets - 11/13

RESTFul OpenID Authentication A plugin to do OpenID authentication in Rails, in a RESTful way. Off the Rails - An alternative Rails stack Competition is good. Merb and the like provide that competition to Rails. This article runs through an alternative to the Rails stack. It’s always good to keep an eye on what else is out there. Rands in Repose: The Nerd Handbook Ok, this is a bonus link. Not at all Rails related, but relevent to you if you’re reading this.

Rails Snippets - 11/7

Troubleshooting Ruby Processes: Leveraging System Tools when the Usual Ruby Tricks Stop Working A new book from O’Reilly on troubleshooting Ruby (and Rails) apps. From the overview: This short cut introduces key system diagnostic tools to Ruby developers creating and deploying web applications. When programmers develop a Ruby application they commonly experience complex problems which require some understanding of the underlying operating system to be solved. Difficult to diagnose, these problems can make the difference between a project’s failure or success.

Rails Snippets - 11/2

New in Rails: Request Profiler Jeremy Kemper recently committed a request profiler to Rails. It lets you make a request to a URL repeatedly, and then see an HTML or text report of where your code is spending it’s time. This looks very handy. Building Tempo With Rails - Part I A walkthrough of building an app with Rails, which includes feature definition, using Piston to manage plugins, and Restful Authentication.

Rails Snippets - 10/31

The Halloween Edition Obvious Code: Creating a simple news publishing system in Rails 2.0 One of the first tutorials I’ve seen that focuses on Rails 2.0. Deploy a Ruby on Rails app on EC2 in five minutes This would seem to make deploying a Rails app on Amazon’s EC2 very simple: EC2 on Rails is an Ubuntu Linux server image for Amazon’s EC2 hosting service that’s ready to run a standard Ruby on Rails application with little or no customization.

Rails Snippets

A collection of Rails links Using Paypal with Rails This is a nice step-by-step article on integrating PayPal with your Rails application, using ActiveMerchant. Rails 2.0 Features: Multiple Views I’ve only skimmed over the new features in the upcoming 2.0 release of Rails, but this looks like one of the nicest features. This is a good explanation of how it works and why it’s useful. Mongrel 1.0.3 is out A bugfix release of Mongrel is out.

6/23 Ruby & Rails Links

A few links that caught my eye today: An introduction to Ruby on Rails for DB2 developers Nice article if you’re a DB2 user and want to know what the fuss is about. Written by Edd Dumbill. Ruby-Gnome2 Website - Appears to be a decent GUI toolkit for Ruby. I wish someone would get QT’s Ruby bindings working on Windows. The thing I miss most about Python is PyQT. Sapphire in Steel: The Little Book of Ruby - Nice introduction to Ruby with plenty of code samples, in PDF form.

Ruby Is a Titanium Mountain Bike

From Tour de Babel If languages are bicycles, then Awk is a pink kiddie bike with a white basket and streamers coming off the handlebars, Perl is a beach cruiser (remember how cool they were? Gosh.) and Ruby is a \$7,500 titanium mountain bike. Worth the read.

Great Languages Are Intuitive

One of the things that I love about Ruby is that it’s intuitive. If I don’t know the syntax for a particular thing, I can often just guess. More often than not, I’m right (or real close). That’s the mark of a great language. It behaves like you would expect it to behave. Ruby==Love.

Python vs Ruby

Ian Bicking (a python developer I have a great deal of respect for) has a good comparison of Python and Ruby, focusing on the things that are unique to dynamic languages. link

How to Use Eclipse as a Ruby on Rails IDE

Update 11/23/2005: Months later, this is still apparently a popular topic, as it’s one of the most viewed posts here. Time has passed though, and there’s a better option: RadRails. It’s built on Eclipse, but includes Rails-specific tooling, which the configuration discussed below does not. It’s well worth your time to check out. In this short tutorial, I'm going to walk you through setting up a code editing environment for Ruby on Rails using the Eclipse IDE.