未初始化的常量ActiveSupport :: Dependencies :: Mutex(NameError) - 如何解决? [英] Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) - How to resolve?
问题描述
可能重复:
未初始化的常量ActiveSupport :: Dependencies :: Mutex(NameError)
嘿,我在整个网络上都看到过这个问题...任何人都可以解决这个问题吗?
我的应用程序是 RAILS_GEM_VERSION ='2.3。 5'除非定义? RAILS_GEM_VERSION
日志输出
/Users/tjs/.rvm/gems/ruby-1.8.7-p352@rails2/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:55:未初始化的常量ActiveSupport :: Dependencies :: Mutex(NameError)$ / $ b 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:在`gem_original_require'
from /Users/tjs/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/ site_ruby / 1.8 / rubygems / custom_require.rb:55:在'require'
from /Users/tjs/.rvm/gems/ruby-1.8.7-p352@rails2/gems/rails-2.3.5/lib /commands/server.rb:1
来自/Users/tjs/.rvm/rubies/ruby -1.8.7-p352 / lib / ruby / site_ruby / 1.8 / rubygems / custom_require.rb:55:在`gem_original_require'
from /Users/tjs/.rvm/rubies/ruby-1.8.7-p352/ lib / ruby / site_ruby / 1.8 / rubygems / custom_require.rb:55:在'require'
from脚本/服务器:4
我曾尝试在environment.rb,脚本/服务器和rake文件中使用线程,但这只是炸毁了日志...
我有使用1.8.7的rvm,我认为它是兼容的。但是我对rvm还是比较新的,所以我不确定它是否正常工作。
我有3个运行rails 2.x的应用程序,并且都遇到了这个问题。
238-with-rvm.htmlrel =nofollow> http://ecmanaut.blogspot.com/2011/09/running-old-rails-238-with-rvm.html 按照以下步骤操作应用程序再次工作。感谢所有帖子
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.
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
这篇关于未初始化的常量ActiveSupport :: Dependencies :: Mutex(NameError) - 如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!