Rails specs not running under Ruby 1.9 ?

Posted by Kenneth Kalmer on September 27, 2009

I spent some time getting PowerDNS on Rails to run on Ruby 1.9.1, which ended up being very easy due to the small amount of plugins & gems used by the project. The only change I had to make myself was to the acts_as_audited plugin, where the one-line fix got merged upstream.

The worst part of the process was getting the specs to run with rake spec. Using ./script/spec it worked on individual specs and on all the specs worked as advertised, but rake spec didn’t do anything.

After a lot of time spent in the debugger I wasn’t any wiser. The only difference was that in Ruby 1.8 the example groups were fully loaded, and in Ruby 1.9 they were empty. I gave up and started searching relentlessly for some information on the issue. I couldn’t find anything, until I found an indirect solution on the rspec wiki. It seems that if you have any versions of the test-unit gem after the 1.2.3 release installed, your Rails specs will simply not run. For me, removing test-unit 2.0.3 made the difference and the specs ran properly. PowerDNS on Rails has now joined the ranks of my Ruby 1.9 compatible projects.

Clear the log files of all your rails projects

Posted by Kenneth Kalmer on November 21, 2008

I hit a barrier last night where my virtual machine I use for Rails development ran out of space. I quickly checked around and saw my current Rails project had 800MB in log files (thanks autospec).

So I decided to quickly cook up this little bash script that I run from my top level working directory, and have it clear all the log files, in all my Rails projects.

Hope it helps.

Review: Ruby on Rails 2.2 EnvyCast 1

Posted by Kenneth Kalmer on November 05, 2008

So it started with a tweet, and ended up here. The first of a two part review of the Ruby on Rails 2.2 EnvyCast. But first some background…

RailsEnvy

Gregg Pollack and Jason Seifer are the comics of the Ruby and Rails worlds, and I have been a religious follower of the Rails Envy show since somewhere in the 20’s, but have listened to every show and almost rolled my car when I featured on episode 34 for my then work on BIND DLZ on Rails (now living on as PowerDNS on Rails).

Me

I’ll spare you the soppies. I’m a self proclaimed Ruby evangelist trying my best to sneak Ruby into the South African system. Proudly enough I’ve made some conversions and people seem to find me on my cell looking for an opportunity to have beers and talk Ruby. I’m working with some other key Ruby figures here to launch something Rubyists in South Africa needs (but will enlighten everyone when the time is right).

The path to 2.X

I’m still wrapping my head around most of whats new in Rails 2.0 and Rails 2.1, with most of our apps spread between those two. Why get excited about 2.2 then? Well, for me personally it’s the connection pooling (I write a lot dark background Ruby code living inside eventloops and thread pools, speaking AMQP or XMPP and others). Living in a country with 11 official anguages makes I18N a great proposition as well, but thats another story all together.

Interlude

Needless to say I was excited to download my copy of the Rails 2.2 EnvyCast last week, then reality held me back until last night (and again tonight). I was looking forward to a grand show of insightful insanity, packed with great material and new stuff to learn.

Pressing Play

Coffee in hand I opened the archive and played the show…

Being my first EnvyCast I must admit I thoroughly enjoyed the format that Gregg and Jason uses to get their message across. Being able to see your presenters is very powerful and helps to keep your attention. It is a nice break from the Peepcode format (not that Peepcode sucks). I think its a game changer for commercial & educational screencasts.

For 44 minutes I was glued to the screen, following every example and making sense of the changes. I was stumped to see how many new things have been present in Rails, and how much easier things are becoming. I felt the same kinda excitement I did when I first started watching Rails screencasts and comparing it to my PHP code at the time. Whats better is that it’s Ruby compared to Ruby.

Overall

The show covers ActiveRecord, ActiveSupport, ActionPack, ActionController, Railties, I18N & Performance topics. Gregg and Jason have managed to use real world examples when discussing each topic, which makes almost everything 100% relevant.

Every developer who has walked a path with Rails knows its not the silver bullet that solves all problems, and most often allows you to develop so quickly that you reach the fringes of the framework very quickly, unlike PHP where it might takes years to do so. Gregg and Jason exploit these emotions we’ve all shared and highlight how Rails 2.2 addresses the issues for us with some excellent before and after style code snippets.

I was very impressed overall with the content and presentation. Jason’s Rails scaling joke made its way in, although he admitted the end might be near (I don’t believe it). I think its as good for experienced Rails developers as for people just starting out and getting their hands dirty. Don’t know how someone with no Rails history would manage though.

The dose of comedy is also just perfect, it never alienates you from the topic at hand and serves as either a fantastic segway or as cement. I loved every minute of it.

Go get it now!

At $16 the value is unbeatable, the Rails 2.2 Packaged deal (video and PDF) can’t be beaten. I’m still working my way through the PDF, but so far it is just as good as the video. Honestly, if I had to spend the time to research all the changes it would could cost several hunder dollars in company & personal time. $16 is cheap.

Just in case you missed it, here are the links again:

BIND DLZ Update: Nearing in on RC1

Posted by Kenneth Kalmer on July 18, 2008

UPDATE (Jul 22, 2008): I don’t have connectivity at home at the moment, so I’ll roll our production systems over to BIND (and BIND DLZ on Rails) from PowerDNS and Tupa in the morning. Based on the initial feedback from our support team I’ll either address small bugs we overlooked, or tag RC1, whichever comes first.

Just a quick update, we’re closing the gap rapidly on pushing RC1 to Github. Hopefully that happens by the weekend. We’ll also be rolling it into production use to iron out any last remaining issues that didn’t surface from our lab tests/reviews.

We just have one issue to overcome with will_paginate and our custom scoped finders for Zones, then I’ll push to Github.

In preparation (and celebration) I’ve added the project to Ohloh as well for some added metrics and publicity. See the badge below, and on the updated project page.

  • Tags

    activerecord air amqp analytics audits bash bind capistrano cheat convert couchdb daemon-kit dlz dns elsewhere gentoo gist git hoptoad linux macros mercurial messaging mysql nginx olympics plugins postfix postini powerdns presentations projects quickies rails rake review ruby ruby19 ruote security shoes sitemap ssl svn webby
  • Recent Posts

  • Archives

  • Alltop. Seriously?! I got in?