rails console显示SQL日志

1. sudo gem install inline RubyInline

2. create the config file '.irbrc' in user root directory

require 'rubygems'
require 'wirble'
#require 'bond'
#require 'bond/completion'
Wirble.init
Wirble.colorize

if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')
  require 'logger'
  RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
end

你可能感兴趣的:(sql,Rails,rubygems)