sdsykes / slim_scrooge

SlimScrooge heavily optimises your database interactions
313 stars 25 forks source link

migrations wont run with slim scrooge installed #16

Closed activestylus closed 12 years ago

activestylus commented 13 years ago

If I drop and migrate a db from scratch, the rake task runs with no errors but you dont see the usual spill of data as tables are created. Sure enough no tables are created. I even ran rake db:migrate VERSION=001 and it told me migration 1 could not be found. It's almost like Rails doesn't see my migrations.

After an hour of frustration I commented out slimscrooge in my gemfile, rebundled and the migrations worked fine. Pretty serious bug

jarinudom commented 13 years ago

What version of Rails are you running that still uses "001" as a migration version?

activestylus commented 13 years ago

Actually Im on Rails 3.0.5 and if I'm working a project alone I dont need those annoying timestamps, so I just pop into application.rb and:

config.active_record.timestamped_migrations = false
mopx commented 13 years ago

the same thing is happening to me (Rails 3.0.7). Any fixes?

avocade commented 13 years ago

When I use slim_scrooge and deploy to the heroku cedar stack, I can't run any rake tasks any longer.

Going to the console and running rake -T gave me a clue: the current path is actually inside the slim_scrooge gem... I have no clue what's going on, but I removed slim_scrooge faster than quick, and got my rake tasks back.

Just something to be aware of if you're deploying with slim_scrooge (to heroku cedar at least).

omgitsads commented 13 years ago

This is because you are doing Dir.chdir in https://github.com/sdsykes/slim_scrooge/blob/master/rails/init.rb#L3 to run the rake task.

neutronz commented 13 years ago

Thanks so much to the engineyard folks for pointing out the exact problem!