Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) - How to resolve? [duplicate]

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

Hey I have seen this issue a lot across the web... Anybody resolve this with any success?

My app is RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

The log output

/Users/tjs/.rvm/gems/ruby-1.8.7-p352@rails2/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
from /Users/tjs/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
from /Users/tjs/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `require'
from /Users/tjs/.rvm/gems/ruby-1.8.7-p352@rails2/gems/activesupport-2.3.5/lib/active_support.rb:56
from /Users/tjs/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
from /Users/tjs/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `require'
from /Users/tjs/.rvm/gems/ruby-1.8.7-p352@rails2/gems/rails-2.3.5/lib/commands/server.rb:1
from /Users/tjs/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
from /Users/tjs/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `require'
from script/server:4

I have tried requiring thread in the environment.rb, script/sever and rakefile but that just blows up the log...

I have rvm using 1.8.7 which I think is compatible. But I am still newer to rvm so not totally sure I have it working right.

I have 3 apps running rails 2.x and have this problem with all of them.

like image 408
TJ Sherrill Avatar asked Feb 23 '23 15:02

TJ Sherrill


2 Answers

http://ecmanaut.blogspot.com/2011/09/running-old-rails-238-with-rvm.html followed these steps and the app works again.

thanks for all the posts

like image 78
TJ Sherrill Avatar answered Apr 07 '23 00:04

TJ Sherrill


add the "require 'thread'"statement to your "boot.rb" file.

require 'thread'
require File.join(File.dirname(__FILE__), 'boot')
like image 40
bilash.saha Avatar answered Apr 07 '23 00:04

bilash.saha