Windows / migration issues

Running latest rails, etc on windows xp.

I can’t use “rake migrate” to migrate to latest version. I NEED to
specify, i.e. “rake migrate VERSION=11” for things to work
consistently.

plain 'ol “rake migrate” never makes it to the latest version. no
errors, she just stops short of the latest version.

hasn’t been a problem until now – starting to play around w/ unit
tests, and test:units doesn’t get the database to the latest version
before running. this is problematic.

anyone have any info regarding this?

thanks,
clint troxel

See how many of these you can answer :slight_smile:

What database are you using?

have you tried rake db:migrate instead?

what ruby version?
What ruby package? (cygwin, one-click ruby installer)

Did you upgrade your ruby or did you remove it and install a new
version?

Is your database.yml file set correctly?
Are your migrations named correctly?
Do you have the appropriate settings for your database? (installed
sqlite-ruby if using sqlite, installed the appropriate ado.rb file for
microsoft sql server)

answers below…

On 5/3/06, Brian H. [email protected] wrote:

See how many of these you can answer :slight_smile:

What database are you using?
mysql 4.1

have you tried rake db:migrate instead?
I haven’t – Like i said, specifying “VERSION=” is ok when i’m typing
in my cmd line, but running “rake test:units” (I’m assuming) just does
a “rake migrate” – which doesn’t migrate to the latest, at which
point all of the tests fail.

what ruby version?
What ruby package? (cygwin, one-click ruby installer)
1.8.2, one click installer

Did you upgrade your ruby or did you remove it and install a new version?
I believe that i’m still running my original 1 click installation.
If i’ve upgraded I’ve upgraded using the 1 click installer.

Is your database.yml file set correctly?
yep. (also, worth noting that this problem happens in all of my rails
apps, around 15 of them) – so i doubt it’s something screwy in the
application code(?).

Are your migrations named correctly?
yep.

Do you have the appropriate settings for your database? (installed
sqlite-ruby if using sqlite, installed the appropriate ado.rb file for
microsoft sql server)
I haven’t installed anything other than mysql as far as db goes.

hmm… does that help at all?
-c

consistently.
thanks,
http://lists.rubyonrails.org/mailman/listinfo/rails


clint troxel _ openEndStudios.com _ 307.413.0366
http://openendstudios.com

and… dug into my ruby installs – i’ve installed ruby via the one
click installer twice.
once as 1.8.2-14, and then again as 1.8.2-15 (I did NOT uninstall
1.8.2-14 before proceeding with 15).

-c

On 5/4/06, Clint T. [email protected] wrote:

1.8.2, one click installer
application code(?).
-c

specify, i.e. “rake migrate VERSION=11” for things to work

[email protected]


clint troxel _ openEndStudios.com _ 307.413.0366
http://openendstudios.com


clint troxel _ openEndStudios.com _ 307.413.0366
http://openendstudios.com

also, rake db:migrate has the same problem.

On 5/4/06, Clint T. [email protected] wrote:

I haven’t – Like i said, specifying “VERSION=” is ok when i’m typing

Did you upgrade your ruby or did you remove it and install a new version?
yep.

plain 'ol “rake migrate” never makes it to the latest version. no



clint troxel _ openEndStudios.com _ 307.413.0366
http://openendstudios.com


clint troxel _ openEndStudios.com _ 307.413.0366
http://openendstudios.com

I know how you feel. I have had the same issue. When I change a
migration and run rake migrate nothing happens. I have to delete my
tables and then clear my schema.rb file to actually get it to work. It
is a hassle but I don’t do it often enough for it to matter.

Clint T. wrote:

and… dug into my ruby installs – i’ve installed ruby via the one
click installer twice.
once as 1.8.2-14, and then again as 1.8.2-15 (I did NOT uninstall
1.8.2-14 before proceeding with 15).

-c

On 5/4/06, Clint T. [email protected] wrote:

1.8.2, one click installer
application code(?).
-c

specify, i.e. “rake migrate VERSION=11” for things to work

[email protected]


clint troxel _ openEndStudios.com _ 307.413.0366
http://openendstudios.com


clint troxel _ openEndStudios.com _ 307.413.0366
http://openendstudios.com

Never had this problem. However I would recommend the following
solution:

  1. Detele everything in the c:\ruby folder
  2. Reinstall One Click (any version)
  3. Reinstall Rails (gem install rails)
  4. Ensure that Rake is the latest version after that install… 0.7 or
    higher.

If it doesn’t work then, let me know. I might be able to still help.

I have the same problem…
WinXP Pro
Ruby 1.8.4 (installed independently)
Rails 1.1.2 (installed via gem)
MySQL 4 (installed independently)

The migration works the first time when the DB is fresh, but subsequent
rakes don’t do anything. I also had to delete everything like Seth. I
thought it was because I was new to migrations.
-Chris

[[trying this again… last message bounced…]]

funny – i just jumped through those hoops.
now i’m back up and running w/ latest rails and rake, and ruby 1.8.2
from the one click installer (can’t go 1.8.4, RMagick barfs). and
still, the same issues

interesting side note: applicationX has 10 migrations. “rake
migrate” gets it to version 3. “rake migrate VERSION=8” gets it to
version 8, then “rake migrate” again REVERTS BACK TO VERSION 3 !?

Thanks brian for your help!
-c

On 5/4/06, Brian H. [email protected] wrote:

1.8.2-14 before proceeding with 15).

[email protected]
http://openendstudios.com


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


clint troxel _ openEndStudios.com _ 307.413.0366
http://openendstudios.com