# Rake db:test:prepare causes error

**URL:** <https://www.ruby-forum.com/t/rake-dbprepare-causes-error/125914>\
**Category:** Rails\
**Created:** [January 13, 2008, 7:33pm UTC](https://www.ruby-forum.com/t/rake-dbprepare-causes-error/125914 "2008-01-13T19:33:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 13, 2008, 7:33pm UTC](https://www.ruby-forum.com/t/rake-dbprepare-causes-error/125914/1 "2008-01-13T19:33:19Z")

</div>

I am a newbie to RoR and I’m having trouble getting testing up and  
running. I tried Googling my problem and haven’t found an answer that  
has worked. When I run rake db:test:prepare, I get the following error  
(I’m working with the RailsSpace book):

Macintosh:rails\_space myusername$ rake db:test:prepare  
(in /Users/myusername/Documents/rails\_projects/rails\_space)  
rake aborted!  
Mysql::Error: You have an error in your SQL syntax. Check the manual  
that corresponds to your MySQL server version for the right syntax to  
use near 'DEFAULT CHARACTER SET `utf8`’ at line 1: CREATE DATABASE  
`rails_space_test` DEFAULT CHARACTER SET `utf8`

I can post the full trace here if that would help. I am using Rails  
2.0.2 with MySQL 4.0.21 on Mac OS 10.5.1. Thanks,

Jamie F.
