Quick Tip: Sprinkle, passenger-stack, and Rails 3

If you’ve tried to get passenger-stack and Sprinkle 0.3.1 running recently, you might have run into the not-so-helpful error: uninitialized constant ActiveSupport::Dependencies (NameError).

It appears that if you have  one of the Rails 3 beta gems installed, then Sprinkle gets confused when trying to use ActiveSupport’s Dependencies module. This error can be fixed by modifying lib/sprinkle.rb in the gem directory. Add the following line right after require ‘activesupport’ (line 2):

require 'active_support/dependencies'

Hopefully the author of Sprinkle will get this bug fixed up soon. An issue on Github has been created.

Update: Github user ahaller has submitted a patch. It sounds like it’s OK to just add the require line even if you are on Rails 2.

    • Anil Bhat
    • December 16th, 2010

    Thanks for this piece of useful information. Just an update on this, if sprinkle.rb is absent in your ruby setup, add this line
    require ‘active_support/dependencies’
    to lib\ruby\gems\1.9.1\gems\activesupport-3.0.3\lib\active_support.rb

  1. No trackbacks yet.