Pergunta

I try to create a standalone migration file by executing the following command:

rails generate migration LoadData

But I got the following error:

 PATH-TO/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)

 PATH-TO/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
 ...

I am using Rails v2.3 and ruby Enterprise edition. Why I got this error, how to get rid of it?

Foi útil?

Solução

This is an incompatibility between some version of Rails 2.3.xx and recent versions of RubyGems. I got this error with Rails 2.3.4 and then used a more recent version of Rails 2.3.11 as of now to get rid of this error.

In case it is not possible to update the Rails version, then in your RakeFile add in the beginning.

require "thread"

Downgrading the RubyGems version will also help. Afaik Rubygems version 1.3.5 is compatible with Rails 2.3.4 and 2.3.5.

Hope this helps.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top