Search Results for "rake"
It's been a couple of months since the last job round up but the Ruby Inside job board has been hopping! There are 14 live listings to go over today and they're not all in San Francisco. Jobs in Denver and Maryland bring in a bit of interesting variety.
A tweak to the format now that Ruby Inside has gone all "tumblelog" on you: I've decided not to include blurbs about every job in the listings since if you're interested in a company or the location is suited to you, you're going to click through and read the extended information anyway. Most companies give quite a lot of detail so click through and check them out.
Ruby on Rails Developer(s) (Entry-level-to-Senior)
CreaTek Solutions, Inc. —Boulder, Colorado
Ruby on Rails Developer
Foraker —Boulder, Colorado
Senior Ruby on Rails Developer
Get Satisfaction —San Francisco, California
Sr. Ruby Engineer- CoTweet
ExactTarget + CoTweet —San Francisco, California
Ruby On Rails Developer
On-Site.com —Lafayette, Colorado
Front End Developer
SingleFeed —San Francisco, California
Rails Developer
Context Optional, Inc —San Francisco, California
Sr. Ruby on Rails Programmer (or perl/python/django/catalyst)
Insight —Birmingham, Alabama
Software Engineer, Scalability
Zendesk —San Francisco, California
Software Ruby/Rails leader Engineers
RotoHog —Los Angeles, California
RoR Engineer
Zendesk —San Francisco, California
User Interface Software Engineer
BoxTone —Columbia, Maryland
Front End Developer
Zendesk —San Francisco, California
Frontend Engineer
Onehood, Inc —San Francisco, California
Want your job(s) to appear on Ruby Inside and on the sidebar of Rails Inside? Check out our "Post a Job" page for info on how it all works and how much it costs.
Whenever something's a really "big deal" in the Ruby world, we cover it - even if it makes more sense on Rails Inside (which is now switching to a user contributions model). Given that, we've gone through all the latest and greatest Rails 3.0 related links and put together a ton of them to help you on your way with the recently released Rails 3.0 beta. Enjoy!
Getting Started / Must Reads
Rails 3.0 Release Notes - An epic amount of documentation from the Rails Guides project. If you're already pretty familiar with Rails 2.x and just want to know what's new and updated, this is the place to look first. If you read this whole page, you'll get a good feel for what you need to pick up next.
The Path to Rails 3: Greenfielding New Apps With The Rails 3 Beta - Jeremy McAnally has written an awesome practical guide to setting up Rails 3 beta and creating a new app from scratch. Of note is his coverage of the new app generator and configuration system. He gets you as far as finishing off some scaffolding and even adding some tests.
Rails 3 Introduction - A two week old post by Jeremy McAnally that provides a high level introduction to Rails 3. What is it, why is it? And so forth. He demonstrates how Rails has moved from a monolithic, packaged "deal" to an ecosystem of more loosely coupled libraries that work together.
How To Install Rails 3.0 Beta - Our own guide to getting Rails 3.0 up and running. Sure, it's only two lines, but we beat the official Rails blog by 4 minutes on this *g*
RailsPlugins.org - A new Rails plugins directory.
Upgrading & Preparing Your Existing Apps
Geoffrey Grosenbach's Rails 3 Upgrade Screencast - Geoffrey Grosenbach (of PeepCode fame) has put together a free screencast demonstrating how to migrate a Rails 2.x app to Rails 3.0. A very high quality production.
rails_upgrade Plugin - An official plugin that runs checks on your Rails 2.x application and notifies you of obvious things that need to be changed for Rails 3.0 usage. It's unlikely to give you full coverage of every issue, but as a general overview it's pretty cool.
5 Things You Can Do Today to Make Your App Ready for Rails 3 - A short post that recommends you start to use Bundler, use inherited_resources, use rails_xss, use more named scopes, and change your references to certain constants.. all in your existing app so it's easier to upgrade to 3.0 later.
Rails 3 Ready Plugins - If you're heavily dependant on a certain plugin, see if it's already on the confirmed Yes/No list of plugins that do/don't work with Rails 3.0. It's still a short list so if you're a plugin maintainer, be sure to add your plugin if you know either way!
How to upgrade plugins to Rails 3.0 - A fresh and code heavy look at how to make some basic changes to upgrade a Rails 2.x plugin to Rails 3.x standards!
Rails 3.0 Libraries and Components
Active Record Query Interface 3.0 - Pratik Naik demonstrates ActiveRecord's finder methods and shows how a number of techniques are being deprecated in Rails 3.1. In essence, queries move away from a single find* method packed with arguments to a chain of methods performed upon a simpler find. There are lots of good code examples in here! Why Arel? is also a great introduction to this topic and shows the motivation and theory behind the "relational algebra" in ActiveRecord 3.
ActiveModel: Make Any Ruby Object Feel Like ActiveRecord - Yehuda Katz introduces us to the new ActiveModel system in Rails 3.0 by showing us how we can use it to make any Ruby class feel like an old-school ActiveRecord model. All of this is a result of splitting out the model and database behavior from ActiveRecord into separate libraries, thus removing the necessity for a database backend (or nasty hacks).
Render Options in Rails 3 - Yehuda Katz looks at how Rails 3's rendering pipeline works and demonstrates how to add a custom PDF renderer to it.
Generic Actions in Rails 3 - Yehuda Katz (again!) shows us how to create clever "generic actions" to do things like redirections direct from the routes file and generic template rendering. It's also worth a look for the discussion on route matcher changes.
Making Generators for Rails 3 With Thor - David Trasbo demonstrates how to use Thor (essentially a better Rake - sorta) to produce new generators for Rails 3 projects. This is a code heavy walkthrough. There's more on generators here.
New ActionMailer API in Rails 3.0 - Mikel Lindsaar got stuck in and built a much improved mail library for Ruby. This new "mail" library is now the new foundation of ActionMailer in Rails 3.0. In this article, Mikel gives a tour of how it works and how you can put together mails quickly and easily from within Rails 3.0 apps.
Validations in Rails 3.0 - Mikel Lindsaar shows how validations have changed in Rails 3.0. Instead of being a part of ActiveRecord, they're now in ActiveModel and can be used on non-DB related objects too! The old school validation methods are still around but now there are some other, cleaner ways to accomplish the same things.. Mikel shows you how.
Rails3_DataMapper - A library that gets DataMapper working on Rails 3. It was updated just yesterday and people have been recommending it on Twitter. If you're a DataMapper user, check it out! Update: There's now a tutorial on getting DataMapper running on Rails 3 beta!
The Rails Module - Nick Quaranto looks at how constants like RAILS_ROOT, RAILS_ENV and RAILS_DEFAULT_LOGGER have been deprecated in favor of accessing methods stored in the global Rails module (e.g.: Rails.root, Rails.env, Rails.logger).
Rails 3 I18N Changes - José Valim looks at some internationalization (i18n) changes in Rails 3.0 over 2.x - along with basic examples.
Insights
A Retrospective - Rails 3 core team member Yehuda Katz looks back at the past year and analyzes the key changes. This is worth reading if you want a softer, more thoughtful, higher level view than the release notes provide.
My 5 Favorite Things About Rails 3 - It's a few months old, but Yehuda Katz takes a look at some of the sticking points of Rails 2.x and shows how Rails 3 provides significant improvements.
Misc
Webbynode Gets Rails 3 Support for Rapid Deployment - Hosting company Webbynode shows how you can deploy a Rails 3.0 app to their VPS system with just a single command line entry. It's a bit like Heroku but more powerful and customizable. Of course, you have to pay for the VPS, but hey :-) It's also demonstrated how you can run a Rails and PHP app side by side on the same system.
How to Install Rails 3.0 Beta on Ubuntu Linux - An Ubuntu-specific guide to setting up a basic Ruby 1.9 and Rails 3.0 beta stack.
Let Your SQL Growl in Rails 3.0 - Gavin Stark demonstrates how he tweaked Rails 3.0 to put out Growl notifications for all SQL queries performed by ActiveRecord. Cute trick.
Exploring Rails 3 Free Online Conference - O'Reilly and RailsConf are putting on a free two hour online conference that features Yehuda Katz, Gregg Pollack, Jeremy Kemper and Ryan Tomayko talking about different parts of the Rails 3.0 ecosystem. It takes place on February 18, 2010.
Signed and Permanent Cookies in Rails 3 - Pratik Naik demonstrates how to set "permanent" cookies in Rails 3.0, more easily than in previous versions, all thanks to a new cookies.permanent object.
Extending Rails 3 Video - Yehuda Katz in an hour long talk demonstrating how to extend Rails 3.0.
New Rails Logos - Wanna use a Rails logo somewhere without obvious licensing or trademark issues? Check out our little contest/brewing pot of public domain logos over at Rails Inside!
How to Build Sinatra on Rails 3 - Yehuda Katz gives a code heavy demonstration of how to get a basic Sinatra application working within a Rails 3 app.
Unobtrusive JavaScript in Rails 3 - A very old post looking at some of the changes being made to JavaScript helpers in Rails 3.0.
Changes in Rails 3.0 for Agile Web Development with Rails Edition 3 - The Pragmatic Programmers are keeping a page with changes necessary for the popular AWDWR book to keep it working with Rails 3. Good to look at it if you're learning from this book!
Rails 3 App Generator Script - Want to get a complete, scaffolded Rails 3 app up in seconds? This script will get you on your way.
MooTools Driver for Rails 3 Helpers - Rails 3 is now JavaScript framework agnostic, and if you want to use MooTools, here's some info on how to go about it.
North Korean Rails 3.0 Launch Party - Everyone's in on the festivities!
NEW! Bundle Me Some Rails - A walk through using the new Gem bundler with Rails 3.0 by Mikel Lindsaar.
Another Rails 3 Link List - Michael Bumann started to keep a list of Rails 3.0 links a few days ago, so there might be others not covered here. Just found another one by Melvin Ram too.
Logo at top of post courtesy of Dylan Clendenin. See more new, unofficial Rails logos and/or submit your own!
[news] @peterc here! My next "big thing" is a new site called coder.io. If you're into technologies like Ruby, Git, Python, the iPhone, MySQL, JavaScript, Clojure, etc, you might want to get on the coming soon list for some eventual freebies/bonuses along with exclusive early access. Thanks!
One of the biggest benefits of bringing Merb developer Yehuda Katz on board to work on Rails 3.0 has been his relentless pursuit of extracting out all of Rails' magical abilities from their monolithic encasings and into separate, manageable chunks. A case in point is ActiveModel, a new library that provides the model related parts of ActiveRecord but without the database requirements.
Get Rails-like Model Behavior on Any Ruby Class
In extracting the model-building parts of ActiveRecord, ActiveModel makes it possible to add model-like behavior to any Ruby class, with no Rails or databases required. In his latest blog post, ActiveModel: Make Any Ruby Object Feel Like ActiveRecord, Yehuda shows off how to get Rails-style models with validations, serialization, callbacks, dirty tracking, internationalization, attributes, observers and all the other Rails goodness.
Example Code
I've taken Yehuda's main example of using ActiveModel on a non Rails class and extended it with some code that actually uses the model:
require 'active_model' class Person include ActiveModel::Validations validates_presence_of :first_name, :last_name attr_accessor :first_name, :last_name def initialize(first_name, last_name) @first_name, @last_name = first_name, last_name end end a = Person.new("Fred", nil) a.valid? # => false a.last_name = "Flintstone" a.valid? # => true
Installing ActiveModel
If you're interested in ActiveModel and not so much in Rails 3.0, installing it is reasonably easy (though not as easy as only installing a gem just as yet):
- Go to or make a temporary directory
git clone git://github.com/rails/rails.gitcd railsrake gemgem install activesupport/pkg/activesupport-3.0.pre.gemgem install activemodel/pkg/activemodel-3.0.pre.gem
Once this is all done, the code example above will work.
As an aside, if you fancy having a go with the full pre-release (a.k.a. "pre") version of Rails 3.0, check out Dr Nic's slightly out of date but otherwise useful guide.
Much of Merb's momentum has been merged into Rails 3, but one-time Engine Yard developer Daniel Neighman has found himself moving in a new direction, inspired by what they had once achieved with Merb Slices. Since then, he's taken fully-mountable Rack applications to the extreme in creating Pancake, a tool & framework to let you stack and loosely couple Rack-based webapps.
Daniel states that web "applications should be self contained rack applications, able to function as gems, able to pick up an entire application and mount it inside another, able to inherit the whole application and take care of the low level plumbing," and also "let you create your own type of application when required." Pancake achieves this by building upon some excellent existing projects, including Tilt for templating, Usher for routing, and Hashie to extend the features of Ruby's hashes and give them additional object-like functionality.
Joining Apps With Rails (And Each Other..)
Yehuda Katz was first seen using Usher in his blog entry How to Build Sinatra in Rails 3 and it is being used for developing Pancake guaranteeing that anything you build with it is going to be mountable in Rails 3. Pancake stacks can be used with the current versions of Rails via Metal, and examples are given on Pancake's blog for doing so.
Sinatra apps are mountable through Pancake, as are any other fully Rack-compliant parts, and Rack middleware can be applied to either the entire Pancake stack, or to individual stacks within the container app. One can first make gems of stacks, which can then be inherited by their containing app or stack. While this sounds like it could become messy quickly, Pancake employs namespacing to keep everything distinct.
Installation and Usage
To get started with Pancake, I ended up installing via:
sudo gem install usher rake pancake haml rcov rack-test rspec racksh
I then created a stack by issuing:
sudo pancake-gen short ri_example ## pancake-gen {short || micro}
To move further, check out two projects: Pancake Blog (mountable basic blogging) and CouchDB Proxy (mountable couchdb proxy)
MagLev is a new(ish) Ruby implementation built by Gemstone Systems that focuses on providing an integrated object persistence layer and a distributed shared cache - a truly scalable Ruby implementation. Maglev has, however, had an air of vaporware about it, having been hyped up in early 2008 and only available to a small group of alpha testers till now. That changes today with the first public, alpha release!
Back in early 2008, MagLev program manager Bob Walker did an interview with InfoQ about the project where he said that 8 people were working on MagLev, so this is a pretty big deal for them. Developer Avi Bryant then did a short presentation at RailsConf 2008 where he gave a comprehensive overview of what MagLev is along with some live demonstrations.
Why Should You Care?
In short, MagLev is cool for a few reasons. Two key ones being that 1) MagLev runs on the SmallTalk virtual machine which, it is claimed, should yield significant performance increases for a language like Ruby, and 2) a MagLev environment allows multiple Ruby processes over multiple machines (if you wish) to use the same objects simultaneously for easy scalability. Avi's video is great if you want to get a grasp on it:
MagLev presentation at RailsConf 2008 from Monty Williams on Vimeo.
Developer Monty Williams is keen to stress that this is an alpha, not a beta, so you can't expect it to run Rails or any gems that require C extensions. That said, it does run Sinatra, Rack, and RubyGems, plus a significant effort has been put into passing the RubySpec, so it's not as if it's a crippled implementation as such.
If you want to learn more, consider following the MagLev team on Twitter @MagLev and checking out the official mailing list "maglev-discussion."
Installation (i.e. getting to an irb prompt that works)
Bear in mind that MagLev will only work on 64 bit versions of OS X, Linux, and Solaris, so if you're in the 32 bit club, there's no point in going any further (yet).
If you download the MagLev Installer script (small ZIP file), you can run the installMaglev.sh script and install the latest version like so:
./installMaglev.sh 22578
The announcement post doesn't make it clear you need to provide a version number of what version number to provide. 22578 was mentioned earlier in the day though, and it seems to work.
Once installed, MagLev provides some info about environment variables you need to add to your .bashrc or .bash_profile. Follow these, then open a new terminal and here's how you get to an irb session:
$ maglev start
startnetldi[Info]: Starting GemStone network server "gs64ldi".
startnetldi[Error]: could not start server
startstone[Info]: Starting Stone repository monitor "maglev".
startstone[Info]: GemStone server 'maglev' has been started.
$ maglev-irb
irb(main):001:0> 20 + 20
=> 40
irb(main):002:0> exit
error , SystemExit Error, nil,
during /Users/peter/Downloads/MagLev-installer/MagLev-22578.MacOSX/bin/maglev-irb
SystemExit Error, nil
Alternatively: GitHub installation
MagLev is also available from GitHub to clone. To install MagLev from GitHub:
git clone git://github.com/MagLev/maglev.git cd maglev ./install.sh
.. then follow the note about adding the path to your .bashrc or .bash_profile and running Rake in a new prompt (though still under the maglev project directory).
If you get any further with doing something interesting like, say, getting an IRB prompt up successfully on this, do post a comment ;-)
[ad] Find duplication, code smells, complex code and more in your Ruby code with Caliper! The metrics are free and setup takes just one click. Get started!
In the past two years we've seen a number of changes in the world of Ruby webapp deployment, but have you heard of Torquebox? Built upon the Red Hat Inc. JBoss middleware, Torquebox is an enterprise-grade application server that provides scale-oriented services to your Ruby webapps, including turn-key clustering. With its latest release, Torquebox supports all Rack-based Ruby frameworks.
Torquebox comes with job scheduling and asynchronous task scheduling out of the box (no extra installs necessary), and while I've grown fond of RabbitMQ, the ease of using the built-in JMS (Java Message Service) messaging is appealing, particularly if you're likely to deploy within a Java dominant environment. If you are having trouble convincing management to let you use Ruby, Torquebox is the most enterprise-oriented platform I've seen to date. Not just that, it's open-source and licensed under the LGPLv3. Their community site boasts that JBoss (upon which Torquebox is built) is "the world's number one Java application server, and it was created by the community."
Torquebox 1.0.0.Beta18 was released within a day's time from the latest JRuby 1.4 release and you can download Torquebox from its download page, or build it yourself from source easily obtained from GitHub. If you are using Mac OS X, the following code sample will get you up and running with a simple cut and paste:
wget http://repository.torquebox.org/maven2/releases/org/torquebox/torquebox-bin/1.0.0.Beta18/torquebox-bin-1.0.0.Beta18.zip unzip torquebox-bin-1.0.0.Beta18.zip mv torquebox-1.0.0.Beta18-bin torquebox export TORQUEBOX_HOME=~/torquebox export JBOSS_HOME=$TORQUEBOX_HOME/jboss export JRUBY_HOME=$TORQUEBOX_HOME/jruby PATH=$JRUBY_HOME/bin:$PATH sudo gem install jruby-openssl sudo gem install activerecord-jdbcsqlite3-adapter cd ~/torquebox/share/rails rails -m template.rb ~/torquebox_rails_app cd ~/torquebox_rails_app rake rails:freeze:gems emacs config/database.yml # (now prefix sqlite3 with jdbc to become "jdbcsqlite3") jruby -S rake gems:install jruby -S rake db:migrate jruby -S rake torquebox:rails:deploy jruby -S rake torquebox:server:run
While waiting for JBoss to unfurl, you can close your eyes and do a mental walk-through of installing Erlang, a RabbitMQ daemon, cron, HAProxy, etc. – because you won't have to do that with Torquebox – and when you open your eyes approximately two minutes later, you should be able to see the default Rails page at http://localhost:8080. While everything appears the same as if you were running on it on a Mongrel, you're really experiencing Rails as it's presented from within a JBoss AS appserver, more about that in a minute.
Handily, Torquebox contains tried-and-true JDBC drivers for a number of databases, including Derby, H2, HSQLDB, MySQL, PostgreSQL, and of course, SQLite3. Additionally, Torquebox is Capistrano friendly – so you probably won't need to learn any new tricks to deploy – and it also has built-in support for cryptographic key-storage.
With an application appropriately bundled into a WAR file, you can utilize Torquebox's farming to "deploy your app to one node of the cluster, and to have that node farm it out to all of its peers." Torquebox uses httpd+mod_cluster out in front, so it's "intelligently aware" of your JBoss cluster, and thus, if you have a two-node cluster running, and you start two more JBoss instances on the same subdomain, they'll auto-join the cluster and then the existing nodes will auto-farm the app to them. You're app now has twice the resources and didn't need to be restarted, which in and of itself, is pretty huge.
So, where does Torquebox fit in? One can make the argument that it fits "everywhere." The JVM comes pre-installed on Macs, is easy enough to add to Linux or a Windows desktop, and of course deploys to a number of hosts. Scaling the JVM isn't new, and finding the people to do so is probably easier than finding dedicated Ruby programmers. I would be remiss not to point out that JBoss is hungry for RAM, and I realized quickly that Torquebox wanted more cowbell than my Linode 720 could afford. Engine Yard Cloud greatly simplifies deployment to EC2 instances (via Chef), and the smallest instance provides a whopping 1.7GB RAM, so scaling JRuby through the company that houses the JRuby core commiters just makes sense to me. If, however, you feel better qualified to deploy Torquebox yourself, you might look at JBoss Cloud.
I recommend taking 10 minutes to watch the pair (1, 2) of screencasts by Bob McWhirter, which demonstrate all of what I've highlighted here in well under a half an hour.
[ad] Find duplication, code smells, complex code and more in your Ruby code with Caliper! The metrics are free and setup takes just one click. Get started!
Riot is a new Ruby test framework by Justin Knowlden that focuses on faster testing. Justin was frustrated with his slow running test suites, despite employing techniques such as using factories, mocks and avoiding database access. He realized that a slow-running suite makes one reluctant to run it or expand it - not good.
With Riot, each test consists of a block which forms a single assertion on the topic of the test, keeping the tests focused. Tests run in a specific context, and the setup code is only run once per context, further contributing to the speed of your test suite, and unlike some Ruby test frameworks, such as Shoulda, that rely on or are based on Test::Unit, Riot has taken a new approach for speed purposes. In Justin's own comparisons, Riot comes out about twice as fast as Test::Unit.
Here's an example Riot test (from the README):
context "a new user" do
setup { User.new(:email => 'foo@bar.com') }
asserts("email address") { topic.email }.equals('foo@bar.com')
end
Riot's comprehensive README also includes lots of examples and details on how to modify your Rakefile to run your Riot test suite in different frameworks. The full documentation is available online here.
You can install Riot as a gem from Gemcutter:
sudo gem sources -a http://gemcutter.org sudo gem install riot
Justin also has a spin-off project called Riot Rails, which includes some Rails-related macros for testing your Ruby On Rails code, and Alex Young has written a Javascript port of Riot which is worth checking out too. He also has his own look at Riot and demonstrates how Riot can reduce redundancy in tests.
[ad] Codebase is a fast & reliable git, mercurial & subversion hosting service with complete project management built-in - ticketing, milestones, wikis & time tracking - all under one roof. Click here to try it - free.
Boson is a new command/task framework for Ruby by Gabriel Horner (of Hirb fame). Gabriel seems to be trying to supersede Rake, the Ruby "make" equivalent, and from first glance Boson seems to provide many benefits from the "reinvent the wheel" philosophy.
Anyone who's built a Rakefile knows it's not the most straightforward syntax, so Boson's approach of using regular Ruby code in the shape of methods added to a module is refreshing. Tasks are methods, methods are tasks - simple. Within these methods, you can use the options helper method and passed arguments to access command line options and other data. Another feature is that while, like with Rake (or Thor), Boson can execute commands from the command line, you can also do so from IRB (the Ruby "console").
It's always a bit of a crapshoot when new tools come out in the Ruby world. Some catch on, some don't. Gabriel has clearly put a lot of thought into Boson, though, so if enough people are fed up with using Rake for command launching, I think it could catch on. Gabriel's blog post outlines what Boson does perfectly. For those ready to shoot down Rake, though, don't forget to read John Barnette's awesome, recent On Rake post. Rake's not just about launching tasks - it's a killer dependency resolution engine at heart, and that can result in less code if you approach your problems the right way.
(Aside: Sorry for the slow week at Ruby Inside. Six days ago my wife gave birth to our daughter and since she had a C-section, I'm playing housewife. I have quickly discovered if you're a housewife - or husband! - you have about zero hours left at the end of the day to do any other work.. I shall try my best!)
[ad] Mobile Orchard's from Rubyist to iPhone programmer in 2 days class is coming to Portland/OR Nov 12-13 and Los Angeles/CA Nov 19-20. $1200 $799 with early reg and "inside" discount code. Note that the early registration price ends tomorrow - 10/23!
Watchr is a continuous-testing tool by Martin Aumont in the vein of Autotest (part of the ZenTest package).
At its heart, Watchr basically watches any (or all!) of your project's files, then executes arbitrary Ruby code of your choice when things change. Watchr configuration takes such a form:
watch('pattern') { |match_data_object| command_to_run }
For example, to produce Autotest-like functionality, you'd just specify Watchr to run the tests whenever a test or some library code changes, like this (taken from Martin's blog post):
watch('test/test_.*\.rb') { |md| system "ruby #{md[0]}"}
watch('lib/(.*)\.rb') { |md| system "ruby test/test_#{md[1]}.rb"}
...but Watchr can be used for much more than just testing. You could use it to automatically generate documentation, build your gem or any other tasks that you can script in Ruby.
To get started with Watchr, just install the gem (from Gemcutter), and run the watchr command from your project root, passing the location of the configuration script:
$ gem install watchr --source=http://gemcutter.org $ cd to/your/project/root $ watchr path/to/script
The source and some documentation (including example scripts) is available on Github, and you can read more on Martin's blog too.
If an even more simplistic route appeals to you, Ruby Inside's editor, Peter Cooper, has a basic Rake task that can run a script of your choice when files change within a project.
Also.. Got a slow Test::Unit or RSpec suite? Run them up to three times faster on Devver's cloud! Setup is simple and requires no code changes. Sign up now!
Welcome to the latest in the series of random Ruby related links I've picked up over the past few weeks. It's a crazy grab-bag of links this time around! Whatever your job, interest, or fetish, there's bound to be something in here that tickles your fancy if you're a Rubyist. Enjoy!
Note: Don't forget that if you like quick-fire links like this, check out our sister site RubyFlow. There are usually anywhere between 3 and 15 Ruby and Rails related links each day coming from developers just like you :)
eval Isn't Quite Pure Evil
James Edward Gray II looks at a case where he used eval and got chastized for it. He then notes that eval isn't necessarily always evil and that our reactions to seeing it in code might be a little quick off the mark.
Sketches - Have Editor-Based Ruby Code Reloaded By IRB Automatically
Sketches is a Ruby tool (available as a gem - gem install sketches) that lets you create and edit Ruby code in your favorite text editor while having it safely reloaded in IRB whenever the code is saved/updated. If you're a bit braver, though, check out Hijack, which gets you a live IRB prompt for any existing Ruby process.
Sumo - One-Off Amazon EC2 Instance Launcher
Sumo (or GitHub repo) is a cute little Ruby-powered command line app to quickly launch and manage Amazon EC2 instances. As an aside, the code provides a small and well formed example of building a command line app around Thor. (If you need something more intense, check out PoolParty, which can manage whole clusters of EC2 instances for you.)
On Rake
On Rake is a perfectly formed blog post by John Barnette about rake (Ruby's "make"). In it he claims most people use Rake simply as a tool to launch tasks (which is true, in my experience) but then quickly demonstrates how Rake's dependency resolution features can radically improve the code you use to define those tasks.
FakeFS - Transparently Get A Fake Filesystem For Ruby
FakeFS is a Ruby library by GitHub extraordinaire Chris Wanstrath that transparently makes the File, Dir, and FileUtils class use an in-memory "virtual" file system. The main benefit of this is for speeding up (and simplifying) test environments.
Getting Started with MacRuby
Getting Started with MacRuby is a great "walkthrough"-style blog post that explains what MacRuby is (an OS X-focused Ruby implementation), how to get it running and how to test it. This is a great guide. We've previously written about MacRuby on Ruby Inside before, if you want to learn more.
Ruby's Metaprogramming Toolbox
Corban Brook has put together a comprehensive article on metaprogramming in Ruby. The highlight is in its conclusion with the implementation of a "poor man's ActiveRecord" where he rolls an ActiveRecord-lite in less than 50 lines of code.
A Native Callback Object for Ruby 1.8.6/7 (MRI) and Ruby 1.9.2
The guys at MethodMissing have come up with a clever Ruby library that provides a native callback system that offers performance superior to lambdas (though not as fast as regular method dispatch). Some interesting "playing with Ruby's guts" work going on in here.
P2P Using TCP & Ruby
Over two years ago on Ruby Inside, I demonstrated how to "punch" a hole through your firewall using Ruby and UDP. Now, Alex MacCaw demonstrates how to implement a P2P-style system in a similar way but using TCP! This is an interesting tactic and works on the majority (though not all!) of routers. I was delighted to see Alex got the idea from an academic paper - there are some great ideas in papers you can pull across into your Ruby work (my library WhatLanguage was based on some ideas in a paper).
Support from: Brightbox; - Europe's leading provider of Ruby on Rails hosting. Now with Phusion Passenger support, each Brightbox server comes with access to a managed MySQL cluster and redundant SAN storage. Brightbox also provides managed services for large scale applications and dedicated clusters.

Devver is a new Ruby testing service that lets you run your tests in parallel on their cloud of servers. This means your tests (or specs, both Test::Unit and RSpec are supported) could run in a third of the time as usual (depending on your setup) and it's as easy as copying a Rakefile into your project and entering a few settings. Devver stresses that "you won't have to alter a single line of your code." Devver is currently in public beta.

I got in touch with Devver cofounder Benjamin Brinckerhoff (pictured first in the image to the right) to get some background on the service, the reason for it being created, and how the whole thing works:
How did you guys come together to build Devver?
Back in 2007, my co-founder and I were building a product review site in Rails. We wrote a lot of tests, which had all the benefits you'd expect. However, we found that once the test suite took over about ninety seconds to run, it became significantly less useful. We started developing all these bad habits: we'd only run a small portion of tests before committing and then let CI handle the rest, we'd get distracted and check email while tests were running, we'd run tests less often, and we started to write fewer tests.
We realized that since testing best practices advocate creating completely independent tests, it would be possible to significantly improve performance running them in parallel. That was what led us to create Devver.
How did you build the prototype of Devver?
We had a week where we didn't have anything really scheduled and were discussing what we should work on. We decided that it might be interesting to try to build a prototype of the distributed testing idea we had.
We actually completed the first version in a little over a week. It ran on the eight computers that we had in our house (our various servers, laptops, and a bunch of old computers we found in our closets). It was incredibly hacky - you had to manually log in and set up a ton of stuff on each computer. There was no automatic code distribution, our communication between components was a hugely inefficient system we built on top of Rinda, and it only worked for our specific code base. But it did speed things up! Even that early version cut around 60% of the time off our big functional test suite.
What convinced you that Devver was worth going ahead with full-time? It's not the usual sort of developer service..
We did a demo of that early prototype for TechStars and were fortunate enough to be accepted into the program for the summer of 2008. Once we got accepted into TechStars, we knew we wanted to work on developer tools that were based in the cloud, but we weren't sure our idea of test acceleration was interesting by itself. The thing that convinced us was a talk we gave at Pivotal Labs. The project was still in its infancy, but the feedback we got was clear - many Ruby developers really wanted a tool that would enable them to run their tests quickly so they could run them more often.
What surprises have have you found with Devver so far?
We always expected Devver to be a challenging project, but making it as compatible as we'd like has been even more difficult than we anticipated. Early on, we had a plan (which, at the time, we considered extremely clever) to make Devver work on a ton of open-source projects in order to improve our compatibility. We got many open-source projects working and thought we were in good shape. Of course, as soon as we started bringing on additional closed-source projects, we quickly learned they were quite different from open-source ones!
One nice surprise has been the degree to which Rubyists write highly independent tests. Early on, we expected that many test suites would contain hidden dependencies - that is, you'd have to run the tests in a certain order. It's really easy to miss these dependencies when your tests always run in the same order on your local machine. But in practice, we've seen virtually zero suites that have interdependent tests. As a result, the tests parallelize well and we can run them very quickly, which is great.
What stack are you using for Devver? (i.e. Ruby version(s), libraries, daemons, anything like that)
We run on Amazon EC2 instances running Linux and use their SimpleDB for our storage. We currently run Ruby 1.8.6 (but we'd eventually like to let the user determine if we run their tests using 1.8.6, 1.8.7, or 1.9). We use Beanstalkd for our job queues. We have components built on top of EventMachine and Sinatra, and some that are entirely custom.
Where do you see Devver going in a year's time?
First and foremost, we want to make our core experience as awesome as possible. That means making Devver even easier to set up and compatible with more projects. As a quick example, we don't currently support Cucumber, but we'd like to. After that, we'd like to beef up our web site to display some metrics that individual developers and teams would find useful. For instance, we'd like to track code coverage over time or give you a report that lets you view your slowest tests.
But of course, we'll stay flexible and keep listening to what our users want. We love any and all feedback. If there is a reason that a user or team can't or won't use Devver, or a feature they'd like to see, we'd love to know about it so we can continue to make Devver better!
Disclaimer: You might have seen a couple of footer ads on Ruby Inside advertising Devver - though this writeup is in no way dependent on that; it's a cool tool!
Ruby Version Manager GitHub repo (a.k.a. RVM) makes it ridiculously easy to install and switch between multiple Ruby versions on OS X and Linux. Over the last 24 hours, I've been playing with RVM and talking to creator Wayne E. Seguin and have been blown away with how cool (and simple) it is - you will definitely want to check this one out.
RVM's most compelling feature is that it caters for six different distributions out of the box (MRI 1.8.6, MRI 1.8.7, 1.9.1, 1.9.2, Ruby Enterprise Edition 1.8.6, JRuby 1.3.1) and it'll install them the first time you need to use them. RVM doesn't mess up your current Ruby install - the RVM installed implementations are only activated manually by you and you can switch back to the "default" with one line.
It's possible to install different patch levels if you like too and Wayne has put together a list of examples to show you the various things RVM can do from the command line (including gem management).
Using Ruby Version Manager
I find shell sessions demonstrate how things work better than narrated instructions, so.. enjoy:
Installation
# gem install rvm # rvm-install [Follow the prompts.. you can let it edit your ~/.profile or you can do it manually]
Using a different Ruby
# rvm use 1.9.2 <i> Installing Ruby from source to: /Users/peter/.rvm/ruby-1.9.2-preview1 <i> Extracting ruby-1.9.2-preview1... <i> Configuring ruby-1.9.2-preview1 using '--enable-shared', this may take a while depending on your cpu(s)... <i> Compiling ruby-1.9.2-preview1, this may take a while, depending on your cpu(s)... <i> Installing ruby-1.9.2-preview1 <i> Installing rubygems dedicated to ruby-1.9.2-preview1... <i> Installation of ruby-1.9.2-preview1 complete. <i> Installing rake # ruby -v ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-darwin9.8.0] # gem list *** LOCAL GEMS *** hoe (1.11.0) libxml-ruby (1.1.2) minitest (1.4.2) rake (0.8.4) rdoc (2.2.2) rubyforge (1.0.3)
Note that instead of 1.9.2, you could use “ree”, “1.9.1”, “jruby” and more..
Returning to your default Ruby
# rvm use default <i> Switching to default ... # ruby -v ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
RVM is still in its early days so don't try this on your production boxes just yet - unless you're brave! (Note: Two months have passed since RVM's initial release and it is now considered production ready.) You can catch up with the creator, Wayne Seguin, on irc.freenode.net in #rvm if you'd like to discuss the project further or, perhaps contribution installation scripts of your own to be added to the project.
A massive thanks to Jamie Van Dyke for giving me the lead on this useful tool.
Support from: Brightbox - Europe's leading provider of Ruby on Rails hosting. Brightbox is currently looking for a Senior Developer to take a lead developing their customer control panel and other backend systems. They want a great coder and project manager with experience of RSpec and Capistrano.
In Make Your Test Suite UNCOMFORTABLY FAST! (called "the best blog post ever written" by one commenter) Jason Morrison of Thoughtbot demonstrates how to use Michael Grosser's Parallel Specs project to speed up your Ruby tests.
Parallel Specs provides a set of Rake tasks to run specs and tests in parallel, therefore using multiple CPUs (or cores) to multiply your testing power. It does not yet work with Cucumber features but Jason recommends testjour for that purpose - which is designed to work across multiple machines so isn't quite the same thing.
Thoughtbot has found Parallel Specs typically provides a 30-40% speedup for their projects out of the box, so if you're doing a lot of testing (and the best developers seem to say you should be) check it out for some instant satisfaction.
Also.. Got a slow Test::Unit or RSpec suite? Run them up to three times faster on Devver's cloud! Setup is simple and requires no code changes. Request a beta invite today!
It has always been a trend with Rubyists to take things that have poor interfaces and give them better ones. Javan Makhmali from Inkling Markets has lived up to this trend, and given us Whenever, a library that wraps cron's syntax with a Ruby API (cron being a UNIX task scheduling tool).
Whenever can be tightly integrated with Rails (providing application specific commands such as "rake" and "runner" from the API – see an example here), but can also be run as a standalone program. Whenever outputs valid crontab syntax, and can even write the crontab file for you!
Whenever helps you keep your cron jobs with your code so that there is no separation of logic. Since Whenever is a wrapper for cron, however, it's really focused on on UNIX and UNIX-like machines. While there are some cron implementations for Windows, Whenever wasn't really designed for this purpose.
If Whenever is of interest to you, check out the GitHub page, the blog post of Javan's workplace, and the Railscast by Ryan Bates.
Note: This post was written by Ari Brown.
It was way back in November 2007 that we first mentioned Heroku, the then online Rails development and app hosting environment. It's a little more than that now - it bills itself as the "instant Ruby platform" - and you can host Rails, Sinatra, Ramaze, and other Rack apps and deploy them entirely using Git.
Today, Heroku has taken its next big step with its commercial launch. In its first two years, Heroku has been used to run 25,000+ apps and now users can pay for extended services. The free level remains which gives you one "dyno" (essentially a complete Ruby stack with a certain amount of processing power), two dynos then cost $0.05 per hour, all the way up to 40 dynos that'll put you back $1.95 an hour. You can also get extra database storage: 5 megabytes for free, then starting from $15 a month for 50 megabytes, all the way up to $1600 per month for 2 terabytes on a dedicated database box. You can play with the pricing calculator here. Features like Memcached, Workling, and AMQP (message queuing) are on the cards and will likely result in extra monthly charges.
A few days ago, Elijah Miller wrote an article about how to deploy your Rails application in 2 minutes on Heroku that you'll find useful if you haven't tried the service before. It's just a case of some work with the heroku command line client, a Rake task, and git. You might also be interested in Heroku's own Deploy Merb, Sinatra, or any Rack App to Heroku article.
Importantly, Heroku in its basic form is still free and you can go try it right now with no commitments. Congratulations to Adam Wiggins, James Lindenbaum, and Orion Henry for their efforts so far.
Support from: Brightbox; - Europe's leading provider of Ruby on Rails hosting. Now with Phusion Passenger support, each Brightbox server comes with access to a managed MySQL cluster and redundant SAN storage. Brightbox also provides managed services for large scale applications and dedicated clusters.
Five months ago JetBrains (the company behind Java IDE IntellJ IDEA) released a "public preview" of RubyMine, a new Ruby and Rails IDE. Now, they've released the beta of version 1.0, the precursor for a final 1.0 launch later this month. You can download it right away - it came in at about a 75MB download for OS X, but Windows and Linux versions are also available.
When I posted about the preview of RubyMine five months ago, several people raved about how great they thought JetBrains' IntellIJ IDEA IDE was (which RubyMine is built upon). I don't have any personal experience with IntellIJ so you'll need to make your own mind up, but in casual testing RubyMine worked well. There were a few rough edges (project file list didn't always update with new files quickly; some minor interface snafus; had to add db:migrate Rake task manually) and there's the downside that it takes several minutes to start your first project as it wants to scour through all of your Ruby libraries. On the plus side, it felt more intuitive to put together a basic Rails app than in the other IDEs I've tried so far.
Ruby Inside will feature a complete review once the final release drops.
The Feature Set
On the surface, RubyMine offers all of the features you'd expect from a high-end IDE:
- Code completion
- Code snippet support
- Refactoring tools
- Project file management / navigation
- HTML, CSS, and JavaScript editing (including Erb support)
- RSpec and Test::Unit support (with GUI-based test runner)
- Built-in Rails console
- Ruby debugger (with full support for Rails apps)
JetBrains' RubyMine blog is a good source for info about these features as most of them have been added over time.
It's Commercial - But Only $99 (or $49, if you want)
RubyMine is available as a free, 90 day trial, but is ultimately a piece of commercial software that will retail for $99. JetBrains have a sign up form where you can get a 50% off coupon for the final version of RubyMine 1.0, however, so that should take the sting out of the tail and bring the price down to $49.
I was a bit worried when I first mentioned RubyMine that it was going to be a $200+ app that people would be reluctant to buy, but if you can get the coupon to get it down to $49, it's a great deal. Even at $99, it's not bad, although, naturally, there are plenty of open source options if it's not to your taste.
Want to install Ruby, RubyGems, and a collection of common gems on Ubuntu 8.10 (Intrepid Ibex) in just a few minutes? Here's the skinny.
If you want, you could use something like Passenger-Stack to do the legwork for you, but I prefer doing manual installations so I know the full score. There are several "how to install Ruby on Ubuntu Intrepid" guides out there but none of them got it totally right for me. I've just used these instructions twice in a row so I know they work. Another bonus is you get ImageMagick and rmagick installed which some people get really frustrated with..
Note: These instructions assume you're running as
rootfor convenience. You can alternativelysudoevery line or just runsudo bashuntil you're done.
Install the system level basics
apt-get update apt-get -y install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev sqlite3 libsqlite3-dev locate git-core apt-get -y install curl wget
Install ImageMagick (for rmagick)
apt-get -y install libmagick9-dev
Install Ruby 1.8 (MRI)
apt-get -y install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby ln -s /usr/bin/ruby1.8 /usr/bin/ruby ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc ln -s /usr/bin/irb1.8 /usr/bin/irb ln -s /usr/bin/ri1.8 /usr/bin/ri
Note: Some advise not to use the packaged version of Ruby on Ubuntu due to its performance. I'm not worried about this. If you are, replace this section with a download of the Ruby source code (
http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz) and untar,./configure,makeandmake installit by hand. You're on your own with that though.
Install RubyGems (from source)
curl http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz | tar -xzv cd rubygems-1.3.5 && ruby setup.rb install cd .. && rm -rf rubygems-1.3.5 ln -s /usr/bin/gem1.8 /usr/local/bin/gem gem sources -a http://gems.github.com # add Github as a gem source, you won't regret it
Install a set of starter Ruby gems
gem install rake nokogiri hpricot builder cheat daemons json uuid rmagick sqlite3-ruby fastthread rack
What next?
By this point you now have Ruby installed with RubyGems, a collection of gems (including rmagick) and you can branch off where you want. If you want to develop a Sinatra app, install the sinatra gem and you're away. If you want to install Rails, gem install rails. And so forth.
If you want to install Apache with Passenger for hosting your apps, however, read on..
Optional: Install Apache and Passenger
echo "deb http://apt.brightbox.net hardy main" > /etc/apt/sources.list.d/brightbox.list wget -q -O - http://apt.brightbox.net/release.asc | apt-key add - apt-get update apt-get -y install libapache2-mod-passenger
Note: Brightbox's Passenger package is officially for Ubuntu 8.04 (Hardy) but it works fine on Intrepid in my experience.
If you need PHP5 as well:
apt-get -y install php5 libapache2-mod-php5 php5-mysql /etc/init.d/apache2 restart
Optional: Need a very, very basic firewall?
apt-get -y install ufw ufw allow to 0.0.0.0/0 port 80 ufw allow to 0.0.0.0/0 port 22 # (or whichever port you use for ssh) ufw allow to 0.0.0.0/0 port 25 # (if you need mail in) ufw enable
Note: You're installing the firewall, not me, so don't complain if you get locked out because of the firewall or something :) Ensure you have the correct ports and/or a console access to your server just in case (such as Linode supplies).
Support from: Brightbox; - Europe's leading provider of Ruby on Rails hosting. Now with Phusion Passenger support, each Brightbox server comes with access to a managed MySQL cluster and redundant SAN storage. Brightbox also provides managed services for large scale applications and dedicated clusters.
Feedzirra is an all-new Ruby feed parsing (it's not a generator) library by Paul Dix. The choice of feed parsing libraries in Ruby has been reasonably limited so far, so Feedzirra is a most welcome addition to the Ruby ecosystem. Its focus is on pure speed - it uses Nokogiri (an ultra fast Ruby XML parser that depends on libxml) and curb (bindings for libcurl - to do the HTTP work) so compilation is required. Feedzirra was designed to be used to fetch thousands of feeds, process updates quickly, save on bandwidth (with conditional GETs, etc) and be dead simple to use.
Paul is also interested in flexibility:
A second design consideration was that I wanted the library to be extensible and customizable. This means that you can add custom parsers to Feedzirra to handle different feed types (like microformats, for example). What this also means is that if you find a bug in the parsing on a specific feed, you can write a parser (should take less than 20 lines of code) and use it with Feedzirra while you wait for me or a contributor to get the bug fix in. Feedzirra also allows you to define callback behavior after success or failure of fetching a feed.
Paul has put together a compelling code example that shows off several of Feedzirra's features - including basic fetching and parsing, multiple feed fetching, feed update fetching, and callbacks. To run it, just install Feedzirra:
gem sources -a http://gems.github.com sudo gem install pauldix-feedzirra
See Paul's announcement post for more, along with comments regarding problems during installation (one key problem I had on OS X Leopard with native Ruby is that curb doesn't install properly - to resolve it git clone git://github.com/taf2/curb.git then run rake gem in the curb directory, then sudo gem install pkg/curb-0.2.4.0.gem - it's not a MacPorts only issue as Paul seems to indicate).
Support from: New Bamboo - London's leading Ruby consultancy is looking for an experienced developer to join early 09. Click here to learn more about the position.

You might know Hampton Catlin as the Rubyist who invented the Haml markup system (as used in many Ruby web apps), Sass or make_resourceful. What you might not know, however, is that Hampton went on to develop a successful Wikipedia iPhone app (iPedia née iWik - listen to this podcast about its development) and was then hired by Wikipedia to lead the development of the mobile Wikipedia site (powered by Ruby!)
Hampton has been taking Ruby into Wikipedia in a big way and he needs the help of other Rubyists to keep the momentum going. I caught up with Hampton to find out what he's doing at Wikipedia, what Wikipedia needs, and how Rubyists can get involved:
Ruby Inside: What are you responsible for at Wikipedia?
Hampton Catlin: My title there is "Mobile Development Lead" and basically I'm responsible for making sure that people with mobile devices have access to Wikimedia projects. Initially we are focusing on Wikipedia, but since all of the Wikimedia projects run on basically the same code base, we are going to be covering most of the projects.
My main responsibility is to grow open source communities around the different mobile projects. Wikipedia is the fourth most popular site in the world and most of the programming is done via open source channels. Initially, I'm doing a lot of the foundational programming and will be responsible for maintaining code quality, but into the future, we are really looking for people to help and take charge of different components.
How is Ruby involved in the work being done at Wikipedia?
Ruby is being used via Merb (Rails 3?) and a whole series of Ruby libraries that are focused on the back end formatting services. Actually, we just launched them last week, and they are still a little rough, but the foundations are solid. Basically, the Ruby app is responsible for providing custom-formatted article pages to different mobile apps. The service is currently live at http://en.m.wikipedia.org
How would you (and Wikipedia) like Rubyists to get involved?
Go grab the code at http://github.com/hcatlin/wikimedia-mobile/tree/master then run rake todo:list. Viola! Pretty soon we are going to have a full bug tracker, but at the moment, its a pretty early stage in the project and bugzilla is a bit overkill.
I think this is a huge opportunity for people. How often do you get to do work that is seen by so many people and potentially so many more? It's a very simple project to dive into. I've put a LOT of work into making sure that it is absolutely as simple and logical as possible. I've also put a lot of work into documentation to ensure that people don't get confused when diving in. And if you are just learning, its actually a good project to look at.
Beyond general help with the project, I'm also looking for people to help work on adding new mobile formats. Initially we are focusing on "XHTML" and "WebKit" as the two major supported platforms. That is the same thing as "Anything Modern" and "iPhone/Android". However, if you have a Blackberry and you want to see stuff on Wikipedia that is totally perfect for your phone, then its pretty easy to do! Just add a device to our list, figure out its user agent, and then go create the views! Its stupid simple. Also, you can brag at dinner parties "Oh, you have a Blackberry... look at what I did this weekend!" ;)
The final thing we need help with is press. We need to get the word out to regular users! If you know people that run a mobile conference or work in the press, please try and help us out. One of the major failures of the first-generation of Wikipedia Mobile was that no one knew about it. Its part of my job to make sure they know about this.
What new technologies or services do you anticipate being created for or by Wikipedia in the next year? (that are relevant to Rubyists)
Beyond the mobile services, not too much! We just need to keep growing them with press (tell your friends!), bug reporting, and new formats. Oh, and if you want to learn iPhone development, grab our edge branch of the iPhone app at http://github.com/hcatlin/wikipedia-iphone/tree/master
At the time of writing this, its a little rough but its what I'm doing this week! We also need people who know Java development to help with a native Android app. And, for Ruby stuff... I'm looking to have an entire Mediawiki Ruby library done. But, it's not the kind of thing I've very good at, so at the moment its taken a back seat. If anyone wants to create one, shoot me an email (at hcatlin -at- wikimedia.org). We can make it "official".
Update: You can also discuss this on IRC on irc.freenode.net on channel #wikimedia-mobile
Support from: Brightbox - Europe's leading provider of Ruby on Rails hosting. Now with Phusion Passenger support, each Brightbox server comes with access to a managed MySQL cluster and redundant SAN storage. Brightbox also provides managed services for large scale applications and dedicated clusters. — Special Offer: 50% off all new Brightboxes! For a limited period, get a Brightbox from £19.50 a month...

Note: This post is a part of Ruby Inside’s Top 10 in 2008 series. To learn more or see the other awards, read this introductory post.
Giles Bowkett - Controversy, Excitement, and Awesomeness in 2008
Giles simply had to feature in Ruby Inside's Top 10 of 2008 and since there's no Top Crazy Mofo category, he instead scores for this excellent presentation at RubyFringe (yes, it's all there to watch online, thanks to InfoQ!) Despite nominatively being about his "semi-autonomous Ruby musical instrument" Archaeopteryx, the presentation is really about building up an ecosystem around your passions - something most of us can relate to. In his spare time, Giles has a provocative blog, works for star-studded Ruby-powered development team ENTP and works on the aforementioned awesomely unspellable Archaeopteryx.
We caught up with Giles for what was initially a short interview to find out what he's been up to in 2008 and what he has planned for the coming year.. but his indepth answers have turned it into a much longer and more awesome affair:
Ruby Inside: So, Giles, how and when did you get into Ruby?
Giles Bowkett: Somebody I knew was doing some kind of web project, as the project manager, and her programmer wanted to use Rails. This was in 2005. She didn't know anything about Rails and wasn't sure she should believe her programmer, who was utterly ecstatic about it. I looked into Rails as a favor to her, just a simple tech review, and was kind of blown away by its awesomeness.
How have your Ruby & Rails related projects gone in 2008? Surprises? Successes? Failures?
I went to at least ten, maybe fifteen conferences and user groups this year to speak about Archaeopteryx, and that number is after leaving out the two conferences I missed by accident and the one I got myself banned from (by criticizing an organizer). This was both a success and a failure - I wore myself out to the point of near-exhaustion, but I got to speak at a ton of awesome conferences, meet a ton of interesting people, and learn about a ton of interesting projects. The sheer number of awesome projects going on in Ruby-world right now is amazing.
Three things stand out to me as extraordinary: Archaeopteryx is awesome, I got good responses to nearly all my talks - with the response at RubyFringe being incredible - and best of all, my talks motivated people to create their own music projects. I've been able to replace parts of Archaeopteryx with better code by Ben Bleything, for example, and there's a chance I'll be able to do the same soon with superior code for timing as well. (Timing is a really important piece in music software.) I've also got a beta of Matt Mower's Elysium, which is Objective-C and MacRuby. Matt told me my talk at RubyFringe was part of the inspiration for Elysium, and Elysium is a very innovative app. This was a huge ego boost. Seriously it's really cool to see other people get excited about stuff like that.
What plans / outlook / projects do you have for 2009?
I'm going to do less conferences and play more parts in student films. I'm going to put more energy into music this year as well. Some more music software will result from that, I'm fairly certain, but I'm more interested in just making a ton of good beats. I'm going to look to sell my screenplay, of course, but if that doesn't happen, I think I might set it up as a graphic novel on the Web. There's a lot of stuff in there about hippos vs. zombies that came out of random conversations at the Ruby Hoedown. Can't say for sure, though.
I'm also going to develop my barely-0.0.1 refactoring console Towelie into something a little more useful, partly by building in connectors to similar projects like Reek and Flay. I'm going to clean up Archaeopteryx a little, make it easier for people to read. There's still continuations code in there I don't even use, and it confuses newbies a lot - they think if you want to use Archaeopteryx, you have to understand continuations, and that's not the case at all.
I'm also probably going to be doing some training through ENTP, and some promotional videos for it as well, so although I won't be at conferences as much, there will still be some interesting video to watch. And we developed something at ENTP which is pretty nifty, that might see the light of day as a microapp. I'm not sure if I can say anything more than that, though.
What do you think other Rubyists should be learning about or checking out in the new year?
MacRuby looks like it's going to be a big deal. Rubyists who are into music will see cool stuff happening with Midiator and RAD (and hopefully Archaeopteryx!). Elysium has embedded MacRuby scripting. You can attach Ruby procs to individual notes, for example. In the Web world Mike Pence is doing some interesting stuff with components, you might see some news on that front.
I think acts_as_git is crazy cool. Blatant self-promotion here, but I'm also stoked about Tender, an ENTP app. GitHub uses it already. It takes the suck out of customer support. You should also use it for open source projects. It's a bug reporter that links seamlessly with Lighthouse ticket-tracking.
Have any Rubyists had a big impact on your work in 2008?
Markus Prinz and Xavier Shay made rbcoremidi, which makes it possible for Ruby to receive MIDI In on OS X. Basically this means you can play a synthesizer and Ruby will know what notes you played. I've also used MIDI In to have a Nintendo WiiMote trigger arbitrary Ruby code. rbcoremidi makes Ruby MIDI much more powerful.
Ben Bleything improved Archaeopteryx immensely. I was actually arguing with Greg Borenstein from RAD (the Ruby Arduino project) over whether or not he should ask Ben for help with something, because Ben's indispensable to both of our projects. Greg is extremely smart, by the way, and doing a lot of awesome work. I'm hopefully going to interview him and do a podcast with Jeremy McAnally (from the Ruby Hoedown, the Rubyist magazine, and of course ENTP) if/when we get organized about that.
Sinatra is one thing I love, it's like shell scripting for the Web. It's so easy to make throwaway apps that I went through several Sinatra apps in the course of building one Sinatra app, just because they're so quick and easy to make that you can go through several versions, or build Sinatra app A to populate Sinatra app B with data. I have to admit, though, I ended up grafting a lot of Railsy features onto Sinatra for a work project.
ActiveResource was a big part of 2008 for me but I added so many features to it with plugins and whatnot that on the project in question I turned it into a little bit of a Frankenstein monster. In the end I really have to say ActiveResource isn't for every application. You kind of have to think about resources in a particular way, which may or may not apply to what you happen to be doing.
Another project I like is Thor by Yehuda Katz. Thor is utterly freaking awesome. It's just like, all the stuff that you were using Rake and Optparse for, even though you knew you shouldn't, you can now do with Thor, and it's less overhead. Obviously there are still some things where Rake is the clear winner, e.g., I believe RAD uses Rake to compile Arduino code from Ruby, and using Rake as a compiler is actually pretty logical, in a twisted sort of way, because it is after all a Ruby make. A lot of people use Rake for shell scripts, though, and that's kind of nuts. Thor is a much cleaner option for that, and it lets you avoid Optparse, which I personally find gnarly and then some.
GitHub changed the way I work, both by getting me onto git and because of its social features. Git is awesome but I'm still wrestling with its weirder corners. Also locally in Los Angeles the LA Ruby user group is doing pretty awesome. The people involved in making it happen would be Nate Murray, Dan Yoder, Morten Bagai, Coby Randquist from Confreaks, Reid MacDonald, Alf Mikula, Jakob Dunphy, and tons of other awesome people who I'm totally dissing by forgetting them (sorry). You can tell I've been in Los Angeles too long, my props to fellow Rubyists is as full of thanking people as some damn Oscar acceptance speech. ;-)
Also Stu Holloway told me about a wicked awesome project that I'm not allowed to describe but which was the inspiration for Towelie.
And if you want to be a good programmer, the key is calendaraboutnothing.com (by ENTP programmers Kyle Neath and Rick Olson aka Technoweenie).
Thanks Giles!
Projects and Links

Note: This post is a part of Ruby Inside’s Top 10 in 2008 series. To learn more or see the other awards, read this introductory post.
Jeremy McAnally - One of Ruby’s Busiest Hackers of 2008
Jeremy McAnally (Twitter @jeremymcanally) is a Huntsville, Alabama based Ruby developer who has been developing software for about 10 years and now works for popular consultancy ENTP. He takes Top Hitter (no, not Hitler!) for being, in Ruby Inside's opinion, one of the most consistent releasers, challengers, and driving forces in the Ruby and Rails worlds this year. His releases span many media - two books (Ruby In Practice and The Humble Little Ruby Book), a magazine (The Rubyist), libraries (context, matchy, dcov, and more), and a blog (his blog - omg blog!! lol!!).
Jeremy cites his overriding goal as making things simpler by solving complicated problems with beautiful implementations. In this sense he has done very well. His latest significant project, rg, a Rails application generation template system, has been integrated into the Rails core and will make life a lot easier for Rails developers in the future. Jeremy was also the driver behind one of only two successful efforts to launch a Ruby print magazine in 2008 with The Rubyist (the other being the German Rails Way). With context and matchy, Jeremy has also taken a good shot at making Test::Unit an attractive alternative to RSpec.
If we all kept releasing and trying as many things as Jeremy has in the last couple of years, the Ruby community would be awash with all sorts of amazing projects. For this, he easily takes Ruby Inside's slightly awkwardly named Top Hitter accolade.
Mini Interview
We caught up with Jeremy for a short interview to find out what he's been up to, what he has planned, and who he finds interesting in the Ruby world..
Ruby Inside: How and when did you get into Ruby?
Jeremy McAnally: I was working on a project and needed dynamic typing. I found Ruby and *loved* it, but the serial library wasn’t working with my hardware, so I ended up using Python instead. I rediscovered Ruby a few months later when I saw an article about Rails and haven’t looked back since (except one unfortunate liaison with PHP but we won’t talk about that!).
How have your Ruby & Rails related projects progressed in 2008? Any surprises?
I’ve had a lot of surprises this year. I honestly didn’t think The Rubyist would ever actually come to fruition, but here we are. One issue out and another on the way.
After a lot of false starts for projects (an RDoc replacement named docr, a Rake replacement named lake, and a few others), I ended up with a few solid releases of some testing tools (context, matchy, and stump). They’re still taking shape, but a lot of people seem to really enjoy using them as much as I do. I’m really interested to see where they go; it makes me feel good to be using simple code to write beautiful tests!
What plans / outlook / projects do you have for 2009?
I want to keep pushing my testing tools forward, but I also have a few other places I want to go. I want to get back to contributing to Rails (and I’m working on a few interesting things in that realm right now); I want to work on simplifying many of the core tools we depend on these days (and work alongside those who have already started doing so, such as the folks who’ve release minitest, thor, and so on). Other than that, I’ll have to see what presents itself. :)
Outside of Ruby, I plan on doing some iPhone work also. I’ve started hacking a few apps, but I want to extract some pieces of those into some open source libraries. There’s a very small amount of OSS code out there for iPhone, which means there’s plenty of territory to cover for those who are willing to do the work.
What do you think other Rubyists should be learning or checking out in the new year?
I’m not totally sure. I cast a fairly broad eye across the Ruby ecosystem, but I think the most interesting thing I see right now is Adhearsion. It’s sort of a sleeper project, but I think when it hits critical mass, it’s going to be huge.
Have any Rubyists have made an impact on your work in 2008?
I’ve been really interested to see all the fun and interesting Ruby tricks out there (simple example: the new #try stuff in Rails). Some of them are really elegant, and they’ve taught me a lot about Ruby objects and how to effectively expand their behavior. As for blogs, I’ve really been loving Mike Gunderloy’s blog. He’s a fairly recent addition to my blogroll, but he always has interesting links. Ben Bleything also has a lot of interesting projects, and, as I’m sure you’re ware, Giles always has really interesting and sometimes disturbing posts.
Thanks Jeremy!
Projects and Links
- The Rubyist Magazine
- Context library
- Matchy library
- Jeremy’s blog
- The Humble Little Ruby Book (going to be updated soon)
- Jeremy on Twitter
What's Hot on Github is a monthly post highlighting interesting projects that are new or updated this month, within the Ruby community that are hosted on Github. Github has become an extremely popular place for Ruby and Rails developers to congregate lately, so I wanted to list some of the new projects, and some of the updated ones, that I have found interesting and that are too small for their own blog post.
This month's picks:
- http://github.com/karmi/marley/ - Marley is minimal blog engine without admin interface written in Sinatra framework
- http://github.com/evilchelu/braid/ - Simple tool to help track Git and SVN vendor branches in a Git repository (had some nice updates recently)
- http://github.com/purzelrakete/blackbook/ - Blackbook automates the nitty-gritty of importing contacts from various services and files and exporting them as VCard, XML, or simple Hash.
- http://github.com/rsl/acts_as_snook/ - ActsAsSnook is a simple and elegant method of handling comment spam that doesn’t rely on CAPTCHAS or Javascript or external web services.
- http://github.com/courtenay/acts_like_git/ - A Rails plugin that uses Git to version ActiveRecord fields, like acts_as_versioned, but a git.
- http://github.com/xaviershay/enki/ - A new Ruby on Rails blogging app
- http://github.com/jnunemaker/httparty/ - Makes it easy to interact with a variety of web services (previously on Ruby Inside).
- http://github.com/maccman/acts_as_recommendable/ - Collaborative filtering for Rails
- http://github.com/hungrymachine/acts_as_routing/ - Support :acts_as in Rails/Merb routing.
A special thanks this month goes to the Rails Rumble team as they made some great suggestions based on what people had used for their applications.
Have any projects to add or want to recommend a project for next month's post? Please leave a comment.
Anyone building up a project with many dependencies - and in the Ruby community, with so much functionality wrapped up in gems and plugins, it's hard to imagine not having external dependencies! - must face the issue of managing the situation in source code control. How do you maintain everything you need in your own repository, while still being able to update your dependencies from their own repository? How do you set things up so you can even contribute to the projects you depend on?
If you're using git, the right answer is often the subtree merge strategy - but remembering the necessary commands can be a nuisance, especially if you rarely use them. There are several projects out there designed to make this easier for you: Tim Dysinger published some rake tasks to handle subtrees, and Braid is a more full-featured tool to manage both git- and svn-based vendor branches. 37signals have also released cached_externals which provides a somewhat different solution to the problem using symbolic links and separated checkouts.
After trying all of those approaches, though, I've settled on Pat Maddox's giternal tool for my own work. With giternal, you add a YAML file with details on your project's dependencies, similar to this:
delayed_job: repo: git://github.com/tobi/delayed_job.git path: vendor/plugins paperclip: repo: git://github.com/thoughtbot/paperclip.git path: vendor/plugins
After that, there are just three commands to remember: giternal update to update all of your dependencies, giternal freeze to create a self-contained deploy tag with all externals at a known version, and giternal unfreeze to go back to live subtrees. If you've been shying away from dealing with externals in your git repositories, give it a shot.

Until last week, Mark McGranaghan was a full-time Ruby developer for TechCrunch, the popular Web 2.0 news site. He worked extensively on CrunchBase, a wiki-style database of companies, people, and investors in the world of Web 2.0. His last assignment was the free-to-use CrunchBase API which went live last week.
I caught up with Mark to ask him about his time working at one of the world's most famous blogs with one of the world's most famous bloggers! You might be surprised to learn that head Cruncher Michael Arrington - who is never slow to point out Twitter's downtime - is pretty cool with Rails and what works well for his developers works for him.
Rails Inside: Hi Mark. Thanks for agreeing to this interview. First, how did you get started with Ruby and Rails?
Mark McGranaghan: I started with Ruby at the end of 2006 when I was a student at Bowdoin College. I stumbled on it randomly while I was exploring new programming languages and ended up using it a lot for writing programs for my discrete math class. At the time I also wanted to do some web programming but didn't like the web stacks offered by the other anguages that I knew - Java, Scheme, and Python - so I started looking into Rails. I got the AWDwR book, subscribed to a bunch of Rails blogs, and then just hacked my way from there.
How did you land the job with TechCrunch?
Henry [a co-developer] and I met Michael through a TechCrunch employee that we had known previously. When TechCrunch approached us about building out a structured wiki for the startup community, we were thrilled. I think that just communicating this excitement and showing that we understood why this was an important problem to solve went a long way in convincing Michael that we were right for the job. We also spoke to some seasoned developers that Michael knew; that conversation going well also gave Michael confidence in us. Michael was also very hands-off about our choice of Rails to implement the site - if it worked for us, it worked for him.
What was it like working at TechCrunch?
We had a lot of autonomy working on CrunchBase at TechCrunch. As the only full time developers, we had both the freedom of and responsibility to make all of the technical decisions. That put a lot of pressure on us, but it also allowed us to move quickly. We made a lot of good decisions, and when we didn't we had to quickly learn form our mistakes and recover.
CrunchBase existed for quite some time before you became involved with it, so what base did you have to work from?
CrunchBase previously existed as a PHP application. The site was very simple. There were only pages for companies, with no links to other entities, and search was implemented with MySQL LIKE queries. We scrapped the PHP code, but had to migrate the existing database. This was done with a 1000+LOC Ruby script that pulled everything out the old database, did a series of transformations in memory, and re-saved to a new database. It took us a long time to understand and normalize the data representations used by the old implementation, but it ended up OK. Being able to use ActiveRecord on both the new and the old tables helped a lot.
How is CrunchBase deployed? Does it scale well?
The CrunchBase Rails app is served by a single dedicated machine provided by MediaTemple. We have to contend with several scalability challenges. The first is the general traffic to CrunchBase.com; the site gets a lot of visitors because of its high Google rank and frequent TechCrunch links and the pages are expensive to generate. Fortunately, the site is very cacheable: most requests are served out of a view cache in a few milliseconds. We generally can't use page or action caching because different types of users see different version of each page - instead we use a custom caching mechanism that takes into account the authentication level of the user. Because of the interconnectedness of the CrunchBase data model, any individual piece of data may be cached in multiple webpages, widget objects, and API responses. When such a piece of data changes, all of the corresponding caches have to be expired.
Another major scalability concern is JavaScript and image requests from TechCrunch.com for the CrunchBase widget that we frequently embed on that site. We serve millions of these objects a day. Fortunately, we are able to serve almost all of them statically with lighttpd, which ends up being very cheap.
What was the motivation for the new CrunchBase API you just released?
We created the CrunchBase API because we believe it is in everyone's interest for this data to be free. It lets developers get convenient access to data [on Web 2.0 companies] and build interesting apps. It lets users find the data in new ways through these apps, and it gives us distribution and establishes us as the data hub. Also in the spirit of freedom, we've made the API as brain-dead-simple to use as possible; just visit an API url (example) and get a pretty-printed JSON output [Ed: This JSON pretty-printer has been open sourced by TechCrunch]. We have no registration, no API keys, no requests limits and no throttling.
Is TechCrunch a good place to work? Are other Rails apps in the works and are Ruby / Rails developers being hired?
TechCrunch is a very interesting place to work as a developer since its at the center of the startup/tech industry. A lot of news, ideas, and even people from the tech industry flow through our office, and you can't help but pick up a lot of energy from that. We now have an opportunity to leverage our position as a hub as well as the TechCrunch brand to create some really cool apps. One new Rails app that we just launched is TechCrunch Pitches, which is a site for users to submit and vote on 1-minute elevator pitch videos from startup founders. In order to support our existing properties and develop new ones we are currently hiring Ruby developers.
Now that you've left TechCrunch to return to school, will you continue to contribute to the Ruby community?
I've always liked doing independent work and research while I'm at school. This year I'm going to focus on open source: learning more from the existing projects and starting a few of my own. In particular I'd like to spend some time away from the Rails world - it's getting a little repetitive for me - and try some new things with Ruby and other languages. I've made a few steps in that direction by writing some components for a new Ruby web framework (github.com/mmcgrana). I'd like to bootstrap the framework by developing a few proof-of-concept open source apps against it. Other components of the Ruby/Rails stack that I'm growing frustrated with are RDoc, Rake, and Capistrano; I'll be looking closely at YARD, Thor, and Vlad over the next few months.
Thanks, Mark! Best of luck with your forthcoming ventures. Mark can be followed on Twitter, if you wish to do so. His username is mmcgrana.

Pool Party is a new tool by Ari Lerner (of ProcessorPool fame) that makes it easy to automate the deployment, monitoring (using monit), persistent storage (using S3Fuse), and load balancing (using HAProxy) of EC2 instances. While intended to be application agnostic, there's naturally a major slant towards Ruby applications in general, with support for Rake tasks a core feature.
Ari's announcement blog post gives more in-depth details. Development is taking place on Github (where the README is somewhat more readable than with RDoc!) along with discussions at a Google group.
Ari presented PoolParty at RailsConf last week, and his slides are available to view below (or at Scribd):


