Upcoming Smoky Mountain Brass Band Concerts

OK, it is time to dust this old thing off and start using it. Let’s start small and work up to larger posts.

I am a cornet player in the Smoky Mountain Brass Band, a British-style brass band in western North Carolina. We are in our 31st year (my 4th, not counting a break I took to focus on a side project). From all accounts we sound better now than we have in several years, so I want to invite as many people to our concerts as possible.

Our next two concerts are Christmas concerts. On , we will be at Hazelwood Baptist Church in Waynesville, NC. Then on , we will be at Groce Methodist Church in Asheville. We will have more concerts on the flip-side of snowy season, so keep an eye on the band’s schedule. Please come if you can!

Posted in Brass Band | Leave a comment

h, h, h, h…

Scouring through a Rails app’s views for the old obsolete “h” helper has reminded me of a few things:

  1. A solid grasp of regular expressions works wonders when you have some idea of what you’re looking for.
  2. NetBeans is rocking the site-wide and in-editor regular expression search like no other IDE I know of.
  3. ERB is ugly as sin. Just saying.
Posted in Ruby/Rails | Leave a comment

Quick fix for a “missing constant” metal problem in Rails 2.3

A bit of metal middleware I use decided to break on me when I upgraded haywood.edu to Rails 2.3.3. The code starts like this:

1
2
3
4
5
 class Notifications
def self.call(env)
if env["PATH_INFO"] =~ /^\/notifications/
notices = Notice.all
...

That

1
notices = Notice.all

turned out to be the culprit. The error:

1
2
3
4
5
6
7
8
/!\ FAILSAFE /!\  Mon Jul 27 17:49:54 -0400 2009
Status: 500 Internal Server Error
A copy of Notifications has been removed from the module tree but is still active!
#{ruby_path}/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:414:in `load_missing_constant'
#{ruby_path}/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:96:in `const_missing'
#{app_path}/app/metal/notifications.rb:7:in `call'
#{ruby_path}/lib/ruby/gems/1.8/gems/rails-2.3.3/lib/rails/rack/metal.rb:44:in `call'
...

A quick Google search yielded blog posts and articles covering related problems with plug-ins, engines and gems. One result suggested making the troublesome class “unloadable”, and the suggestions in the post’s comments followed that same line of thinking. None of these suggestions fixed my problem. There was no specific mention of this happening in middleware except for the lighthouse ticket that lead me to the fix. After reading a comment by Flip Sasser, I changed the problem code to

1
notices = ::Notice.all

to be sure that Notifications looking for Notice in the right context.

To be honest, I am new to middleware. I consider this a step in learning how it fits in with the larger Rails picture. If you have input on how the above problem occurred in the first place, please comment.

Posted in Ruby/Rails | Leave a comment

Upgrading to Ruby on Rails 2.3

I’ve been testing out Ruby on Rails 2.3 at the college since the first release candidate became available. One thing that I have noticed is how responsive the Rails team is to critical issues, and possibly how vocal Rails developers can be. The first release candidate was not friendly to the website. As I researched each problem I usually ended up at a ticket (or two, or twenty…) reporting the problem to the Rails team. Some tickets had patches attached, and some had already been resolved and committed. By the second release candidate, all of the problems I ran into earlier were resolved. We should be able to move to 2.3 soon after its release, after a final, thorough testing. I’m waiting impatiently for the new scope features!

Posted in Ruby/Rails | Tagged , | Leave a comment