I have an application with 15 migrations under version control. In a
Mac and and in a Windows, a rake migrate from scratch runs them all
just fine. But in a different Windows machine rake migrate stops
after migration 3 for no apparent reason. --trace seems normal. No
error is reported. Both Windows are XP SP2. They all have the same
svn revision and Rails-related software, database is SQLite.
I even rebooted the machine to no avail. Does this ring any bell?
I have an application with 15 migrations under version control. In a
Mac and and in a Windows, a rake migrate from scratch runs them all
just fine. But in a different Windows machine rake migrate stops
after migration 3 for no apparent reason. --trace seems normal. No
error is reported. Both Windows are XP SP2. They all have the same
svn revision and Rails-related software, database is SQLite.
I even rebooted the machine to no avail. Does this ring any bell?
No bells, but I would re-checkout on Windows machine 2 into a clean
directory,
clear your database and try again. Perhaps something is screwed up with
the
state of those version control files.
No bells, but I would re-checkout on Windows machine 2 into a clean
directory,
clear your database and try again. Perhaps something is screwed up
with the
state of those version control files.
Yeah, I tried without luck. I even checked the disk just in case
because this morning an Ubuntu in a different partition run a dosfsck
at startup. Nothing, lost by now.
Yeah, I tried without luck. I even checked the disk just in case
because this morning an Ubuntu in a different partition run a
dosfsck at startup. Nothing, lost by now.
Ah, let me add something I discovered. The problem seems to be
related to migration 4, the one that does not get to be run. If I
remove that file everything runs, until the 15th, the last one. I
can’t for the life of me see anything wrong in that migration, which
otherwise runs smoothly in two machines. I copy it below just for the
record.
– fxn
class LaCaixaCrawlerStatus < ActiveRecord::Migration
def self.up
delete_all
CrawlerStatus.create(:entity => Entity::LA_CAIXA)
end
def self.down
delete_all
end
def self.delete_all
CrawlerStatus.delete_all([‘entity = ?’, Entity::LA_CAIXA])
end
end
which otherwise runs smoothly in two machines. I copy it below just
def self.down
delete_all
end
def self.delete_all
CrawlerStatus.delete_all([‘entity = ?’, Entity::LA_CAIXA])
end
end
How has your CrawlerStatus model changed between when migrations 4
and 15 were created? This is a “known” problem when using Model
classes in migrations. (particularly when your model deals with more
columns/attributes than the table has at that point in time)
After a whole day lost doing all kind of trials, changing SQLite with
MySQL, removing rails from vendor, doing clean checkouts, and what
not, I decided to reinstall Windows, this is a quite new laptop so
that was an option. Now the migrations run normally again. The only
strange thing I did this morning was to boot a brand new Kubuntu that
automatically runs dosfsck (that does not mean it was its fault, but
is the only conjecture I have).
Unfortunately I don’t know what happened, but at least I’ll be able
to continue with this project tomorrow.
– fxn
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.