# Problem releated to Ruby activerecord

**URL:** <https://www.ruby-forum.com/t/problem-releated-to-ruby-activerecord/102699>\
**Category:** Rails\
**Created:** [February 28, 2007, 2:51am UTC](https://www.ruby-forum.com/t/problem-releated-to-ruby-activerecord/102699 "2007-02-28T02:51:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f475e1/32.png) [@karry](https://www.ruby-forum.com/u/karry)\
**Post date:** [February 28, 2007, 2:51am UTC](https://www.ruby-forum.com/t/problem-releated-to-ruby-activerecord/102699/1 "2007-02-28T02:51:05Z")

</div>

Hello friends

I have written a class in ruby which creates database table in mysql.  
I have given an option of overwriting the database table if it already  
exists. when i run the code it creates the table in the database for  
the first time but when i try to overwrite the table by running the  
code again it gives me an error

C:\ruby\Crystallizer1\>ruby murrayTest.rb  
created table audit\_trail\_entries  
created Ruby class for AuditTrailEntry

c:/Program Files/ruby/lib/ruby/1.8/mysql.rb:1032:in `sync=': closed stream (IOEr ror) from c:/Program Files/ruby/lib/ruby/1.8/mysql.rb:1032:in`write’  
from c:/Program Files/ruby/lib/ruby/1.8/mysql.rb:1092:in  
`finalizer' from ./nxw-persistency-0.2/nxw-persistency-0.2.rb:22:in`call’  
from ./nxw-persistency-0.2/nxw-persistency-0.2.rb:22  
from c:/Program Files/ruby/lib/ruby/gems/1.8/gems/  
activesupport-1.4.1/li  
b/active\_support/dependencies.rb:488:in `load' from c:/Program Files/ruby/lib/ruby/gems/1.8/gems/ activesupport-1.4.1/li b/active_support/dependencies.rb:488:in`load’  
from c:/Program Files/ruby/lib/ruby/gems/1.8/gems/  
activesupport-1.4.1/li  
b/active\_support/dependencies.rb:342:in `new_constants_in' from c:/Program Files/ruby/lib/ruby/gems/1.8/gems/ activesupport-1.4.1/li b/active_support/dependencies.rb:488:in`load’  
from ./persistencyDSL.rb:75:in `domain\_object\_class’  
from murrayTest.rb:32

I will appriciate your help  
Thank you
