1. ホーム
  2. ruby-on-rails

[解決済み】初期化されていない定数 ActiveSupport::Dependencies::Mutex (NameError)。

2022-04-03 01:48:56

質問

Ruby on Railsのプロジェクトを作成しようとすると、以下のようなメッセージが表示されます。

/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support.rb:57
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails_generator.rb:31
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/bin/rails:15
    from /usr/bin/rails:19:in `load'
    from /usr/bin/rails:19

何が間違っていたのか?どうすれば直るのか?

解決方法は?

Rails 2.3.8とRubyGemsの最近のバージョンとの間の非互換性です。最新の2.3バージョン(本日現在2.3.11)にアップグレードしてください。