Quantcast
Channel: How to show SQL statements in Rails console like WEBrick? - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Srinivas M.V. for How to show SQL statements in Rails console like WEBrick?

$
0
0
  • Go to your console.rb location /lib/rails/console.rb

  • Look for ActiveRecord::Base.connection.instance_variable_set

  • Change it to following

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


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>