Wednesday, November 27, 2013

uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) with rails 2.3.5

Error:

/home/ubuntu64/.rvm/gems/ruby-1.8.7-p374@global/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
from /home/ubuntu64/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /home/ubuntu64/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /home/ubuntu64/.rvm/gems/ruby-1.8.7-p374@global/gems/activesupport-2.3.5/lib/active_support.rb:56
from /home/ubuntu64/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /home/ubuntu64/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /home/ubuntu64/.rvm/gems/ruby-1.8.7-p374@global/gems/rails-2.3.5/lib/commands/server.rb:1
from /home/ubuntu64/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /home/ubuntu64/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'

Solution:

Add this in top of config/boot.rb:

require 'thread'
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
Reactions:

0 comments:

Post a Comment