From: RichardOnRails Date: 2010-07-14T22:30:06+09:00 Subject: Logger's sync and flush returns NoMethod error Hi, Below is my code, which works fine in Ruby 1.8.6 (with Rails 2.3.5), except that sync and flush both return NoMethod. Have thos methods been eliminated? Thanks in Advance, Richard equire 'rubygems' require 'active_record' class Account < ActiveRecord::Base set_table_name "accounts" has_many :comments end class Comment < ActiveRecord::Base set_table_name "comments" belongs_to :account end ActiveRecord::Base.establish_connection( :adapter => 'mysql', :host => 'localhost', :database => 'test', :username => 'root', :password => "rlmrlm") mylog = Logger.new('mylog.txt') # mylog.sync = true # NoMethod error ActiveRecord::Base.logger = mylog temp = Account.find(1) mylog.info("Found a record with username: #{temp.username}" ) mylog.info('About to show comments') temp.comments.each do |rec| puts "#{temp.username} said #{rec.subject}" end #mylog.flush # NoMethod error