Forum: Ruby on Rails Migration Errors?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
12be02204a4bcaeec2c6c369fe53a45b?d=identicon&s=25 Dave Hoefler (Guest)
on 2006-02-17 03:31
(Received via mailing list)
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:in
`belongs_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: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: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:in
`require_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:in
`associate_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:in
`require'
        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 Hoefler
9904f8acaf66a3c1a4b4434676be11cf?d=identicon&s=25 John Kopanas (Guest)
on 2006-02-17 03:34
(Received via mailing list)
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 Hoefler 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 Hoefler
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails


John Kopanas
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
12be02204a4bcaeec2c6c369fe53a45b?d=identicon&s=25 Dave Hoefler (Guest)
on 2006-02-17 03:55
(Received via mailing list)
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. :-) I'll come back to
that chapter at a later time.

Thanks for the info!

-Dave
7ed3175d60e44aa7cb891973223e3998?d=identicon&s=25 Chad Fowler (Guest)
on 2006-02-22 23:23
(Received via mailing list)
On 2/16/06, Dave Hoefler <dhoefler@gmail.com> 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. :-) 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 Fowler
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!)
This topic is locked and can not be replied to.