# Rake stopped working - no error message

**URL:** <https://www.ruby-forum.com/t/rake-stopped-working-no-error-message/137572>\
**Category:** Rails\
**Created:** [May 14, 2008, 9:35am UTC](https://www.ruby-forum.com/t/rake-stopped-working-no-error-message/137572 "2008-05-14T09:35:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_old](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9f8e36/32.png) [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Post date:** [May 14, 2008, 9:35am UTC](https://www.ruby-forum.com/t/rake-stopped-working-no-error-message/137572/1 "2008-05-14T09:35:06Z")

</div>

Hi all…

Background:

I’ve been ramping up on RoR recently and started to resume the photos  
demo in the O’Reilly Book Ruby on Rails Up and Running. I had last  
worked on this just before creating a migration script and I was  
fairly comfortable at that point with understanding and creating  
migrations and using rake. I took a divergence from this practice  
project and even installed some other packages (macports, and some  
other graphics stuff).

Now I’ve returned to this project and I’ve completed the latest .sql  
changes and need to run rake migrate to go back to VERSION=0.

Problem:

I am running rake db:migrate just as I did in the past and I now just  
get this:

mbp-osx:~/Sites/Rails/photos patakijv$ rake db:migrate  
(in /Users/patakijv/Sites/Rails/photos)  
mbp-osx:~/Sites/Rails/photos patakijv$

I get no error messages… but it doesn’t appear anything is  
happening.

What have I forgotten already about rake or what am I doing wrong?

How can figure out what the problem is if I don’t have any error  
messages?

Thanks,

John

---

<div class="post-metadata">

**Author:** ![john\_old](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9f8e36/32.png) [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Post date:** [May 14, 2008, 10:07am UTC](https://www.ruby-forum.com/t/rake-stopped-working-no-error-message/137572/2 "2008-05-14T10:07:09Z")

</div>

To go back to version 0, you need to specify it at the command line:

$ rake db:migrate VERSION=0

then

$ rake db:migrate

WARNING: That will destroy any data you have at your database currently.

When you execute just “rake db:migrate”, and your database is already  
at the latest schema version, no migrations are executed. You can look  
at the current schema info at the corresponding table in the database.  
For example, in MySQL:

mysql\> select \* from schema\_info;  
±--------+  
| version |  
±--------+  
| 12 |  
±--------+

If your latest migration file has the prefix 012, then the rake task  
thinks that the database is up-to-date.

By the way, you can see what rake is doing at the background  
activating the trace option:

$ rake --trace db:migrate

\*\* Invoke db:migrate (first\_time)  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
\*\* Execute db:migrate  
\*\* Invoke db:schema:dump (first\_time)  
\*\* Invoke environment  
\*\* Execute db:schema:dump

Carlos P.

El 14/05/2008, a las 6:06, John  
escribió:

>

---

<div class="post-metadata">

**Author:** ![john\_old](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9f8e36/32.png) [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Post date:** [May 14, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/rake-stopped-working-no-error-message/137572/3 "2008-05-14T20:38:44Z")

</div>

Ah… ok - thanks!

I feel a little silly now… I could have sworn that I did that once  
but obviously I mistyped something…  
and I didn’t realize I would get no messages if there was nothing to  
migrate.

Thanks again!

John
