On Apr 20, 2009, at 5:53 PM, Greg Hauptmann wrote:
> Hi, > > I'd like to know how to monitor the SQL calls (from ActiveRecord) > for both > the cases: > (a) using rails console [development mode], and > (b) running rspec tests [test mode] > > How can I do this? For item (a) I recollect previously I could just > run up > a "./script/server" and see this whilst using "./script/console" > however it > does not seem to be working currently for me. Not sure about (b), but for (a) put this in your ~/.irbrc # Log to STDOUT if in Rails if ENV.include?('RAILS_ENV') && !Object.const_defined? ('RAILS_DEFAULT_LOGGER') require 'logger' RAILS_DEFAULT_LOGGER = Logger.new(STDOUT) end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---