ruby
Flexible constant caching in Rails
Submitted by greg on Tue, 07/21/2009 - 17:48As outlined in By Patrick Reagan's Recipe 61 of the very helpful Advanced Rails Recipes book, it's easy to cache your constants when loading your Rails models, which can help with both performance and speed (and accuracy!) of development. I liked this solution because it's so easy to setup. However, some of my models are better keyed off a different field than name. So I made the below modification to give me the flexibility I needed:
</p>
undefined method `+@' for " ":String
Submitted by greg on Mon, 06/16/2008 - 21:23I came across this less-than-helpful message while working on a little Rails app (hopefully more to come on that later!):
undefined method `+@' for " ":String
The code was something like:
Java/JSP + Ruby/Rails in a single webapp with JRuby
Submitted by greg on Mon, 11/12/2007 - 18:45JRuby has been around for a little while, and is getting lots of attention for its ability to let Ruby developers code for a Java environment, and vice versa. However, as with many young projects, there isn't much documentation when it comes to the fringe cases.
The need I came across is the following: I have a client that's been running a JSP/servlet app under Tomcat for many years (originally started with JSP 0.91!). Over time I've added more and more functionality using the same JSP, Struts, etc. toolkits as everyone else uses.
Continuous Integration Systems
Submitted by greg on Fri, 11/17/2006 - 06:59I've been trying to implement a continuous integration server for one of my bigger projects. Luntbuild has a lot of great features, so I've been working with that. But I keep running into stupid design flaws that always make me reconsider. For instance, Luntbuild supports a very sophisticated variable system that can be used in numerous ways. One helpful use is to refer to the previous successful build.
