Hi,
I’ve been trying for a week to get my first Rails app developed using
migrations. I failed on the command:
rake db:migrate
My last resort has been to faithfully follow Rails Cookbook’s first
example. I stumbled a few times but finally implemented the
Cookbook’s example up to the “rake db:migrate” command, where I got:
C:\var\www\cookbook>rake db:migrate
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/
lib/rake.rb:2242: private method task' called for Rake:Module (NoMethodError) from K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27:in
gem_original_require’
from K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:27:in require' from K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ rake-0.8.1/bin/rake:26 from K:/_Utilities/ruby186-26_rc2/ruby/bin/rake:19:in
load’
from K:/_Utilities/ruby186-26_rc2/ruby/bin/rake:19
Eventually, it dawned on me to try “rake” with no arguments, with “-
h”, with “-v” and always got the same 6 lines of output.
“gem list -r rake” reported that 0.8.1 is rake’s current version.
I’m running:
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
Rails 2.0.2
rake-0.8.1 (apparently: I can’t get “rake -v” to work, of course)
WinXP-Pro/SP2
A gentile push over this hump, even a blunt knock in the head, would
be greatly appreciated. I apologize for the several threads I’ve
started on this topic.
Best wishes,
Richard
Have you tried re-installing rake? That first entry in the trace looks
weird to me–my copy of rake.rb only has 2,240 lines in it…
Hi Roy,
Thanks for reporting your take on the situation! No, I didn’t try re-
installing because I wanted to wait to see if anyone saw anything
weird about it or could point out how I’m mistaken.
I’ll reinstall and post back.
Best wishes,
Richard
Hey Roy,
You were a godsend! A faulty Rake installation has been killing me for
days as I grasped at one theory and then another to explain the
anomaly.
So here’s the result of my migration:
C:\var\www\cookbook>rake db:migrate
(in C:/var/www/cookbook)
== 1 BuildDb: migrating
– create_table(:languages, {:force=>true})
-> 0.1570s
== 1 BuildDb: migrated (0.1570s)
I checked out the Development database and, sure 'nuf, the tables
(languages and schema_info) got created.
Thanks for the encouragement. I would have eventually reinstalled
Rake, but I hated just grasping at straws. So your encouragement was
warmly received.
Best wishes,
Richard
Hey Roy,
You were a godsend! A faulty Rake installation has been killing me for
days as I grasped at one theory and then another to explain the
anomaly.
So here’s the result of my migration:
C:\var\www\cookbook>rake db:migrate
(in C:/var/www/cookbook)
== 1 BuildDb: migrating
– create_table(:languages, {:force=>true})
-> 0.1570s
== 1 BuildDb: migrated (0.1570s)
I checked out the Development database and, sure 'nuf, the tables
(languages and schema_info) got created.
Thanks for the encouragement. I would have eventually reinstalled
Rake, but I hated just grasping at straws. So your encouragement was
warmly received.
Best wishes,
Richard
On Jun 11, 12:01 am, RichardOnRails