In addition to the built-in ActiveRecord and Controller metrics, you can define your own custom metrics. The documentation clearly shows how to add a metric to an instance method, but how do you add one to a class method?
Making today worse so tomorrow seems better.
Thanks to a somewhat well known statistical behavior known as the Birthday Problem, collisions of randomly generated keys are much more likely than you would expect. You can estimate how likely with some quick Ruby.
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.)
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.
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.
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.
Trying to load a new version of a J2ME app on a Sprint v9m, I got this helpful error.
The issue has been reported. Please try again later. 911
Great, now I’m reported. But for what?
Running Selenium on a headless box. Not particularly complex, but amazingly useful for integration testing.