Making today worse so tomorrow seems better.

The Blarg Is Back

Nic Benders on

Now that Merb is going to be Rails, we figured that we would overhaul the old blarg and bring it back to the Rails world. But to keep things interesting, we decided to go all Ruby 1.9.

We also moved the code over to GitHub while we were at it. So if you want to see what we’ve been up to, head over to http://github.com/gnarg/blarg and have a look.

(Note that the RSS feed is still broken, but that will hopefully be working again shortly.)

JNDI With Rails

Michael Guymon on

I like to explain the relationship between Rails and Java is that Rails makes the things I hate doing easy and Java makes the things I like doing possible.

In this mind set, when using Rails on JRuby I want to do as little configuration in Java (XML sit-ups are bad) and leverage Rails as much as possible (a few yml stretches are good). The most common configuration cross over is the database connection. This is where JNDI helps out, now both sides can use the same connection pool.

JRuby Service in Rails

Michael Guymon on

I have two worlds that need to collide. Rails solves the decade long problem of abusive Java web stacks and Java provides mature codebase to the Rails paradigm. JRuby has brought me the spark, now if I can only get the fire burning.

The problem: I need a Spring context to startup with Rails and use the config/database.yml.

The solution: A JRuby Service.

Wildcard DNS and Rails

Nic Benders on

The most common Rails config wants a separate hostname for each application. If you tend to create new ones frequently, this can mean a lot of running back and forth to your DNS config. At best this means waiting for the changes to propagate, at worst it could mean waiting for corporate IT to get around to it.

Luckily, in addition to normal names, DNS allows you to create “wildcard” records that match any name not otherwise defined.

Getting a Good View of Your Couch

Jon Guymon on

So far I have been doing all my CouchDB queries using “temporary views” which are Javascript strings which are POSTed to the database and used to select the records you’re interested in. A more efficient way to do it is to save the Javascript strings as documents, these can be called with less traffic and a simpler API. “Permanent views” also create cached indexes, so they offer performance advantages over temporary views as well.

Bj Makes Attachment_fu Happy

Jon Guymon on

The attachment_fu plugin for Rails is great, and it’s support for S3 as a backend sounds really handy. Sadly tho ugh, it isn’t practical for anything other a demo or a proof-of-concept. Luckily its limitations can be worked around with the cunning use of Bj .