Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7988699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:32:02+00:00 2026-06-04T12:32:02+00:00

Rails WEBrick shows raw SQL statements for any ActiveRecord activities. How to enable that

  • 0

Rails WEBrick shows raw SQL statements for any ActiveRecord activities. How to enable that in the console?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:32:03+00:00Added an answer on June 4, 2026 at 12:32 pm

    To do this you have to enable logger, you could do this as follows.

    Open the rails console:

    ActiveRecord::Base.connection.instance_variable_set :@logger, Logger.new(STDOUT)
    

    Have a look at this link:

    http://rubyquicktips.com/post/292826666/display-activerecord-generated-sql-queries-in-the

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

GEMFILE that starts mongrel gem 'rails', '3.1.0' gem 'mongrel', '>=1.2.0.pre2' GEMFILE that start WEBrick
I'm using webrick to develop my rails app on Mac OS X Lion. I'm
Rails has a nice idiom that makes it easy for you to have a
Rails: I need to set a condition in a has_many that needs the self.id
MBPro:shovell myname$ ruby script/server => Booting WEBrick => Rails 2.3.8 application starting on http://0.0.0.0:3000
I have a rails application which is running well in local (OsX, WEBrick). I've
So, I'm developing my rails applications on my mac, thro WEBrick at 0.0.0.0:3000 and
I wrote a demo HelloWorld Rails app and tested it with WEBrick (it doesn't
Nine times out of ten, whenever I start either the default rails webrick server,
My setup: Rails 3.0.9, Ruby 1.9.2 On my development machine with webrick, an incoming

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.