We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class Comment < ActiveRecord::Base belongs_to :item, :polymorphic => true end
when i run db:migrate -t it gives ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! uninitialized constant Comment::Item /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/base.rb:1199:in compute_type' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/reflection.rb:162:inklass' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:130:in block in acts_as_archive' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:129:ineach' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:129:in acts_as_archive' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:56:inblock (2 levels) in load_from_yaml' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:55:in each' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:55:inblock in load_from_yaml' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:47:in each' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:47:inload_from_yaml' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive/adapters/rails3.rb:4:in block in <class:ActsAsArchiveRailtie>' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/initializable.rb:25:ininstance_exec'
compute_type' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/reflection.rb:162:in
block in acts_as_archive' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:129:in
acts_as_archive' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:56:in
each' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:55:in
each' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:47:in
block in <class:ActsAsArchiveRailtie>' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/initializable.rb:25:in
The text was updated successfully, but these errors were encountered:
Yes, I have experienced this as well. It has to do with compute_type in AR being called during the acts_as_archive declaration.
Sorry, something went wrong.
I send a pull request on this
No branches or pull requests
when i run db:migrate -t
it gives
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant Comment::Item
/home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/base.rb:1199:in
compute_type' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/reflection.rb:162:in
klass'/home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:130:in
block in acts_as_archive' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:129:in
each'/home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:129:in
acts_as_archive' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:56:in
block (2 levels) in load_from_yaml'/home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:55:in
each' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:55:in
block in load_from_yaml'/home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:47:in
each' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive.rb:47:in
load_from_yaml'/home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/acts_as_archive-0.4.0/lib/acts_as_archive/adapters/rails3.rb:4:in
block in <class:ActsAsArchiveRailtie>' /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/initializable.rb:25:in
instance_exec'The text was updated successfully, but these errors were encountered: