# Problem running rake db:migrate

**URL:** <https://www.ruby-forum.com/t/problem-running-rake-db-migrate/99853>\
**Category:** Rails\
**Created:** [July 25, 2006, 11:08pm UTC](https://www.ruby-forum.com/t/problem-running-rake-db-migrate/99853 "2006-07-25T23:08:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [July 25, 2006, 11:08pm UTC](https://www.ruby-forum.com/t/problem-running-rake-db-migrate/99853/1 "2006-07-25T23:08:42Z")

</div>

I’m having a great deal of trouble getting rake to run migrations on our  
staging server. Everything works fine on my dev box, but trying to run  
the  
following on staging results in errors.

* * *

> rake db:migrate  
> (in /var/www/apps/acadtech2/app)  
> rake aborted!  
> Don’t know how to build task ‘db:migrate’

## (See full trace by running task with --trace)

The box has Ruby 1.8.4 and Rails 1.1.2.

Any hints or suggestions appreciated.

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [July 25, 2006, 11:22pm UTC](https://www.ruby-forum.com/t/problem-running-rake-db-migrate/99853/2 "2006-07-25T23:22:33Z")

</div>

Hello Chris,

> ## (See full trace by running task with --trace)
> 
> The box has Ruby 1.8.4 and Rails 1.1.2.
> 
> Any hints or suggestions appreciated.

I haven’t the solution (are you sure you runned the command  
in RAILS\_ROOT ?) but first, be sure you’ve got the  
right list of tasks by checking with :

$ rake --tasks

– Jean-FranÃ§ois.

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [July 25, 2006, 11:25pm UTC](https://www.ruby-forum.com/t/problem-running-rake-db-migrate/99853/3 "2006-07-25T23:25:46Z")

</div>

Hi Jean-FranÃ§ois,

I know for sure that I’m in the RAILS\_ROOT directory, but when I run the  
$  
rake --tasks command, I get an empty list. Any idea what could cause  
this?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [July 25, 2006, 11:42pm UTC](https://www.ruby-forum.com/t/problem-running-rake-db-migrate/99853/4 "2006-07-25T23:42:02Z")

</div>

Solved the problem - somehow my Rakefile had gotten cleaned out. I  
replaced  
it with one from another app and it is working fine now. Thanks for the  
help.

-Chris

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [July 25, 2006, 11:42pm UTC](https://www.ruby-forum.com/t/problem-running-rake-db-migrate/99853/5 "2006-07-25T23:42:19Z")

</div>

Solved the problem - somehow my Rakefile had gotten cleaned out. I  
replaced  
it with one from another app and it is working fine now. Thanks for the  
help.

-Chris

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [July 25, 2006, 11:42pm UTC](https://www.ruby-forum.com/t/problem-running-rake-db-migrate/99853/6 "2006-07-25T23:42:36Z")

</div>

Chris :

> I know for sure that I’m in the RAILS\_ROOT directory,  
> but when I run the $ rake --tasks command, I get an  
> empty list. Any idea what could cause this?

No idea, but I would check all I can check.

- Rake,
- Gems Rails. Are they many versions of Rails installed ?
- Rails code in vendor/rails if the application is frozen,
- create a dumb Rails app, and run inside rake --tasks

that’s the first suggestions I’ve got in mind.

HTH,

– Jean-FranÃ§ois.
