Thursday, March 31, 2011

Ruby Gems 1.6.0 and Rails 2.x - uninitialized constant ActiveSupport::Dependencies::Mutex

If you're like me and you have some older Rails 2.x applications or even prefer to stay on Rails 2.x you might have run across this problem.  I was trying to deploy a Rails 2.3.5 application on one of my Linode virtual servers and received the following error.

uninitialized constant ActiveSupport::Dependencies::Mutex

Fortunately there are a couple places to find information on this error.  Unfortunately most of the suggested fixes were not working for me.   The suggested fixes involved requiring "thread" in just about every place imaginable but that did not resolve the issue for me.  I was running Rails 2.3.5 and RubyGems was 1.6.2 which apparently just wasn't going to work.  I choose to upgrade to Rails 2.3.11 because of this post that suggested it was going to fix my problem.  Moving to Rails 2.3.11 was the only way to resolve the issue for my setup.  If you're having the same problem you'll want to try the steps listed in the "Fixing Rails" heading on that post.

References
Ruby Gems 1.6.0 release notes 
Fixing Rails - Suggestion that fixed this problem

Monday, February 7, 2011

Grep for Windows

I was using a new virtual machine I setup not long ago and was missing a good way to search for a file by it's content.  Normally I would use a command line version of grep but unfortunately this virtual machine was a Windows 2008 box and not quite setup like I normally would.  Since I was looking for a grep utility quick I decided try Google for the answer.  Turns out I stumbled across a GUI Grep utility for Windows and so far I'm loving it.  You can find it here.  http://www.wingrep.com/index.htm