# Rails 1.2.3 'Depot' application \> Can't create table '.\\depot\_development\\products.frm'

**URL:** <https://www.ruby-forum.com/t/rails-1-2-3-depot-application-cant-create-table-depot-development-products-frm/165770>\
**Category:** Rails\
**Created:** [April 17, 2009, 9:57am UTC](https://www.ruby-forum.com/t/rails-1-2-3-depot-application-cant-create-table-depot-development-products-frm/165770 "2009-04-17T09:57:53Z")\
**Posts on this page:** 2\
**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:** [April 17, 2009, 9:57am UTC](https://www.ruby-forum.com/t/rails-1-2-3-depot-application-cant-create-table-depot-development-products-frm/165770/1 "2009-04-17T09:57:53Z")

</div>

So I’m driving myself crazy over the ‘Depot’ application in AWDWR  
(Agile Web D. With Rails) for Rails 1.2. I can’t run my  
migration script (001\_create\_products.rb).

I’m receiving the following error when attempting to run the rake  
db:migrate command on page 75 of the book:

# C:\Rails\rails\_apps\depot\>rake db:migrate (in C:/Rails/rails\_apps/depot) C:/Rails/rails\_apps/depot/config/boot.rb:26:Warning: Gem::SourceIndex#search support for String patterns is deprecated == CreateProducts: migrating

– create\_table(:products)  
rake aborted!  
Mysql::Error: Can’t create table ‘.\depot\_development  
\products.frm’ (errno: 121): CREATE TABLE products (`id` int(11)  
DEFAULT NULL auto\_increment PRIMARY  
KEY, `title` varchar(255) DEFAULT NULL, `description` text DEFAULT  
NULL, `image_url` varchar(255) DEFAULT NULL) ENGINE=InnoDB

The MySQL errno: 121 is a foreign key error. I’ve googled and googled  
this problem, with nothing useful related to the migration.

I have a feeling there’s going to be a problem between my versions,  
I’ve outlined them below in the hope that something obvious jumps out,  
else I’m going to uninstall and re-install it all.

Tried with Rails 2.2, simply couldn’t quite handle the scaffold  
problems (pg 76-77), so decided to revert back to Rails 1.2.3 - to  
achieve this I ran the following:

gem uninstall rails -v=2.2.2  
gem install rails -v=1.2.3

These are the versions I’m running below (MySQL courtesy of  
InstantRails 2.0):

C:\Rails\rails\_apps\depot\>ruby -v  
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:\Rails\rails\_apps\depot\>rails -v  
Rails 1.2.3

C:\Rails\rails\_apps\depot\>c:\Rails\mysql\bin\mysqladmin.exe -V  
c:\Rails\mysql\bin\mysqladmin.exe Ver 8.41 Distrib 5.0.27, for Win32  
on ia32

---

<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:** [April 18, 2009, 1:35am UTC](https://www.ruby-forum.com/t/rails-1-2-3-depot-application-cant-create-table-depot-development-products-frm/165770/2 "2009-04-18T01:35:22Z")

</div>

Nah don’t worry about it, I’m going to make my way forward with Rails  
2.2 and learning the new way scaffolding works.

Cheers!

J
