简体   繁体   English

加载某种互斥锁时出错

[英]rake errors while loading some kind of mutex

I just installed facebook connect for my site, but without having edited something on the files that cast the error I get this: 我刚刚为我的网站安装了facebook connect,但是没有对导致错误的文件进行过编辑,我得到了这个:

rake aborted!
uninitialized constant ActiveSupport::Dependencies::Mutex
/var/www/###/Rakefile:10:in `require'
(See full trace by running task with --trace)

In line 10 of my Rakefile you find: 在我的Rakefile的第10行,您会发现:

require 'tasks/rails'

I haven't edited 'tasks/rails'... what is this Mutex and why does it now cast this error? 我没有编辑'tasks / rails'......这个Mutex是什么?为什么它现在会抛出这个错误?

the error is probably thrown because some code that is in the module ActiveSupport::Dependencies wants to use the Mutex class, but the class for some reason can not be autoloaded. 可能会抛出错误,因为模块ActiveSupport :: Dependencies中的某些代码想要使用Mutex类,但由于某种原因,该类无法自动加载。

Sometimes the problem lies not in the code, but in the environment - like conflicting gems, i guess the issue is that your freshly installed facebook connect messes up some parts in your system 有时问题不在于代码,而是在环境中 - 就像冲突的宝石一样,我想问题是你刚刚安装好的facebook连接会搞乱你系统中的某些部分

It can help to look at the rake some:task --trace output, to determine which file causes the problem - maybe look for calls to facebook connect library, and then try to play with that file - comment out lines that might be causing your problem, to determine what has to be done. 它可以帮助查看rake some:task --trace输出,以确定哪个文件导致问题 - 也许寻找对facebook连接库的调用,然后尝试使用该文件 - 注释掉可能导致你的行问题,确定必须做什么。

To help you further one would need the stack trace, the list of your gems and their version used in the project and maybe steps what have you done while installing the facebook connect 为了进一步帮助您,需要堆栈跟踪,项目中使用的宝石列表及其版本,以及安装facebook connect时所做的步骤

If you can't upgrade from rails 2.3.4, require 'thread' in Rakefile, before boot.rb is initialized. 如果无法从rails 2.3.4升级,请在boot.rb初始化之前在Rakefile中使用'thread'。

You may also need to require it in config/environment.rb, and script/server. 您可能还需要在config / environment.rb和脚本/服务器中要求它。

Looks like this: 看起来像这样:

require 'thread'
require File.join(File.dirname(__FILE__), 'boot')

You have Rails 3.0.5 installed, but are trying to use 2.3.4. 您已安装Rails 3.0.5,但正在尝试使用2.3.4。 While, if you have 2.3.4 installed additionally, they shouldn't conflict to much, I'd recommend you take a look at using RVM for development to create isolated development environments (called gemsets). 虽然,如果你另外安装了2.3.4,它们不应该发生冲突,我建议你看一下使用RVM进行开发来创建隔离的开发环境(称为gemsets)。

Further, you're using Rails 2.3.4, which is incompatible with Rubygems 1.6. 此外,您使用的是Rails 2.3.4,它与Rubygems 1.6不兼容。 I highly recommend you upgrade rails to the latest 2.3 version (currently 2.3.11), as it includes numerous bug and security fixes, as well as compatibility with the latest Rubygems. 我强烈建议您将rails升级到最新的2.3版本(目前为2.3.11),因为它包含许多错误和安全修复程序,以及与最新的Rubygems的兼容性。 Alternatively you can downgrade Rubygems to 1.3.7, but I'd advise upgrading Rails instead as it's a better long-term solution and includes numerous critical security fixes. 或者你可以将Rubygems降级到1.3.7,但我建议升级Rails,因为它是一个更好的长期解决方案,包括许多重要的安全修复程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM