Migration Errors?

Hi there,

I just bought the Rails Recipes and PDF preview of the book. So far
it’s excellent. I decided to try Chapter 8 of the book regarding
tagging.

I’ve done migrations before, and I feel comfortable with them, however
this error stumps me.


antrover:~/RubyProjects/rlog dhoefler$ ruby script/generate migration
add_db_tagging
/Applications/Locomotive/Bundles/rails-1.0.0-min.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/hash/keys.rb:48:in
assert_valid_keys': Unknown key(s): polymorphic (ArgumentError) from /Applications/Locomotive/Bundles/rails-1.0.0-min.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations.rb:519:inbelongs_to_without_reflection’
from (eval):5:in belongs_to' from script/../config/../vendor/plugins/acts_as_taggable/lib/tagging.rb:3 from /Applications/Locomotive/Bundles/rails-1.0.0-min.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:207:inload’
from
/Applications/Locomotive/Bundles/rails-1.0.0-min.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:207:in
load' from /Applications/Locomotive/Bundles/rails-1.0.0-min.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:39:inrequire_or_load’
from
/Applications/Locomotive/Bundles/rails-1.0.0-min.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:22:in
depend_on' from /Applications/Locomotive/Bundles/rails-1.0.0-min.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:30:inassociate_with’
… 35 levels…
from
/Applications/Locomotive/Bundles/rails-1.0.0-min.bundle/Contents/Resources/ports/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
require__' from /Applications/Locomotive/Bundles/rails-1.0.0-min.bundle/Contents/Resources/ports/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’
from
/Applications/Locomotive/Bundles/rails-1.0.0-min.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
`require’
from script/generate:3

As you can see I’m running Locomotive on OS X 10.4.5. I have Rails
1.0. Right before I tried the migration I ran the following:

ruby script/plugin install acts_as_taggable

This is odd because I’ve done migrations before without any problem on
my Mac. All of a sudden they just stopped working.

Any ideas?

Thank you,
Dave H.

I know you need to get Edge Rails for it too work.

rake freeze_edge… is one way of doing it

I don’t know for sure if that is what is causing you the problem but
it will be a problem nevertheless :-). Try it.

On 16-Feb-06, at 9:29 PM, Dave H. wrote:

antrover:~/RubyProjects/rlog dhoefler$ ruby script/generate migration
from script/…/config/…/vendor/plugins/acts_as_taggable/
min.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/
… 35 levels…
activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
my Mac. All of a sudden they just stopped working.

Any ideas?

Thank you,
Dave H.


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

John K.
http://www.kopanas.com

=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference

Ok… I’ll have to try that.

For now I just deleted the whole acts_as_taggable directory under
vendor/plugins. I can now do migrations again. :slight_smile: I’ll come back to
that chapter at a later time.

Thanks for the info!

-Dave

On 2/16/06, Dave H. [email protected] wrote:

Ok… I’ll have to try that.

For now I just deleted the whole acts_as_taggable directory under
vendor/plugins. I can now do migrations again. :slight_smile: I’ll come back to
that chapter at a later time.

Thanks for the info!

-Dave

Hi Dave. Sorry I missed this when you originally posted it. You do
indeed need Edge Rails for acts_as taggable. The new version of the
book walks you through how to get onto Edge Rails.


Chad F.
http://chadfowler.com
http://pragmaticprogrammer.com/titles/fr_rr/ (Rails Recipes - In Beta!)
http://pragmaticprogrammer.com/titles/mjwti/ (My Job Went to India,
and All I Got Was This Lousy Book)
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over one million gems served!)