# Error in my\_thread\_global\_end() when running rake db:migrate

**URL:** <https://www.ruby-forum.com/t/error-in-my-thread-global-end-when-running-rake-db-migrate/133726>\
**Category:** Rails\
**Created:** [April 3, 2008, 12:00am UTC](https://www.ruby-forum.com/t/error-in-my-thread-global-end-when-running-rake-db-migrate/133726 "2008-04-03T00:00:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank\_programmer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/958977/32.png) [@frank\_programmer](https://www.ruby-forum.com/u/frank_programmer)\
**Post date:** [April 3, 2008, 12:00am UTC](https://www.ruby-forum.com/t/error-in-my-thread-global-end-when-running-rake-db-migrate/133726/1 "2008-04-03T00:00:05Z")

</div>

When I run rake db:migrate I get this error at the end.

Error in my\_thread\_global\_end(): 1 threads didn’t exit

I pinned it down to this code which is in 004\_create\_permissions.rb.

```
# create admin user
user = User.new
user.login = 'admin'
user.password = 'password'
user.save(false)

```

If I don’t run user.save(false) I don’t get the error. I am not sure  
why, the user does get saved properly to the database.

Any help would be appreciated.

## Thanks,

Frank K.

---

<div class="post-metadata">

**Author:** ![frank\_programmer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/958977/32.png) [@frank\_programmer](https://www.ruby-forum.com/u/frank_programmer)\
**Post date:** [May 26, 2008, 4:43pm UTC](https://www.ruby-forum.com/t/error-in-my-thread-global-end-when-running-rake-db-migrate/133726/2 "2008-05-26T16:43:21Z")

</div>

Hi Frank K.!. I had similar problem ( my config: “mysql Ver 14.12  
Distrib 5.0.46, for Win32”). I found an answer here  
[http://lists.mysql.com/commits/25160](http://lists.mysql.com/commits/25160) After update to “mysql Ver 14.12  
Distrib 5.0.51b, for Win32 (ia32)” a problem disappeared. Try to update  
your msql, I hope it will help you.

Frank K. wrote:

> When I run rake db:migrate I get this error at the end.
> 
> Error in my\_thread\_global\_end(): 1 threads didn’t exit
> 
> I pinned it down to this code which is in 004\_create\_permissions.rb.
> 
> ```
> # create admin user
> user = User.new
> user.login = 'admin'
> user.password = 'password'
> user.save(false)
> 
> ```
> 
> If I don’t run user.save(false) I don’t get the error. I am not sure  
> why, the user does get saved properly to the database.
> 
> Any help would be appreciated.
> 
> ## Thanks,
> 
> Frank K.
