Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) ruby-on-rails ruby-on-rails

Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)


In case you can't upgrade to Ruby on Rails 2.3.11 (and to expand on douglasr's answer), thread must be required at the top of boot.rb. For example:

require 'thread'# Don't change this file!# Configure your app in config/environment.rb and config/environments/*.rb...


I was able to fix this by downgrading RubyGems to 1.5.3, since it happens with RubyGems 1.6.0+ and Rails < 2.3.11:

gem update --system 1.5.3

If you had previously downgraded to an even earlier version and want to update to 1.5.3, you might get the following when trying to run that:

Updating RubyGemsERROR:  While executing gem ... (RuntimeError)    No gem names are allowed with the --system option

If you get that error, then update, so that it lets you specify the version, and then downgrade again:

gem update --systemgem update --system 1.5.3


This is an incompatibility between Rails 2.3.8 and recent versions of RubyGems. Upgrade to the latest 2.3 version (2.3.11 as of today).