Wednesday, February 7, 2007

OK, *THAT* was painful...

All I wanted to do was to install merb so that I could work on porting some web services I'd already created under Rails. merb 0.0.8 was already installed in the existing Rails project I was working with, but I needed the latest version (0.1.1) which has the REST support in it.

So, I followed the instructions in the README file, created a new merb app, and fired it up:

$ merb -g myapp
$ cd myapp
$ merb


But all I ever got when I tried to access http://localhost:4000 was an incessant error:

undefined method `each' for nil:NilClass

Man, I tried just about everything to figure out where this was coming from. I had checked the gems it depends on and I had them, but I figured it couldn't hurt to execute the entire gem install line at this point:

$ sudo gem install mongrel erubis json mime-types archive-tar-minitar rspec —include-dependencies

I uninstalled merb 0.1.1 (rake uninstall) and reinstalled it from the freshly-checked-out trunk, then repeated the app creation/run commands once again.

It works.

Moral of the Story: follow directions to the letter, no matter how sure you are you "already have that covered."

I'm Getting Too Old to Remember Everything...

... so I figured I'd write stuff down here as I navigate the terrain of Rails and its extended family, including (for now) merb. Hopefully my trails of popcorn will either help someone else or evoke some guidance back to Yours Truly. In any case, off I go....