4

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.

Community
  • 1
  • 1
TJ Sherrill
  • 2,465
  • 7
  • 50
  • 88

4 Answers4

4

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

TJ Sherrill
  • 2,465
  • 7
  • 50
  • 88
3

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

require 'thread'
require File.join(File.dirname(__FILE__), 'boot')
bilash.saha
  • 7,226
  • 2
  • 35
  • 40
1

you just need use a new gemset using rbenv https://github.com/jamis/rbenv-gemset or rvm and install this one rubygems-update 1.4.2

gem install -v 1.4.2 rubygems-update
gem update --system 1.4.2

cheers

HashDog Team
  • 657
  • 5
  • 4
0

Another solution that worked for me is to use rails of higher minor version by settting env:

export RAILS_GEM_VERSION=2.3.12
Dfr
  • 4,075
  • 10
  • 40
  • 63