简体   繁体   中英

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:

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:

require 'tasks/rails'

I haven't edited 'tasks/rails'... what is this Mutex and why does it now cast this error?

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.

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

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.

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

If you can't upgrade from rails 2.3.4, require 'thread' in Rakefile, before boot.rb is initialized.

You may also need to require it in config/environment.rb, and script/server.

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. 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).

Further, you're using Rails 2.3.4, which is incompatible with 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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