DEV Community

Taira
Taira

Posted on

1

【Rails】How to settle uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)

Introduction

Hello everyone.
I'm learning programming by myself in the U.S and trying to become a software engineer.
Before I studied Rails tutorial, I couldn't do 'rails -v' command because of this error 'uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)'.

Today I'm going to talk about how to settle this problem.

What caused this error?

I ran this command in Jan 16th 2025.

rails new _7.0.4.3_ sample_application
Enter fullscreen mode Exit fullscreen mode

After that, the terminal showed this error when I ran 'rails -v'

uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
 
 
 
Enter fullscreen mode Exit fullscreen mode

I looked for why it caused this error, and it turned out that concurrent-rubygem recently updated to version 1.3.5.

How to fix it

I fixed this bug like this:

  1. Add this command to Gemfile
gem 'concurrent-ruby', '1.3.4'
Enter fullscreen mode Exit fullscreen mode
  1. run 'bundle install'

To this day(Jan 27th 2025), it remains unresolved.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE