Skip to content
New issue

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

Migration error when upgrading from 515839e73b to HEAD #366

Closed
apraditya opened this issue Jan 7, 2013 · 28 comments
Closed

Migration error when upgrading from 515839e73b to HEAD #366

apraditya opened this issue Jan 7, 2013 · 28 comments

Comments

@apraditya
Copy link

Hi, I'm trying to upgrade from 515839e to HEAD (03725d7). After restarting the rails app, noticed there's a change in database structure, so I run rake forem:install:migrations and added some new migration files. The problem comes when I ran migration. I get this error:

An error has occurred, all later migrations canceled:

undefined method `name' for #<Forem::Forum:0x007fe0ca316520>
/Users/apraditya/.rvm/gems/ruby-1.9.3-p194@myapp/gems/activemodel-3.2.10/lib/active_model/attribute_methods.rb:407:in `method_missing'

Did I miss something? Thanks for the great work!

@radar
Copy link
Collaborator

radar commented Jan 7, 2013

Did you also run rake db:migrate?

On Monday, January 7, 2013, Adinda Praditya wrote:

Hi, I'm trying to upgrade from 515839ehttps://github.com/radar/forem/commit/515839e73bto HEAD (
03725d7 03725d7882). After
restarting the rails app, noticed there's a change in database structure,
so I run rake forem:install:migrations and added some new migration
files. The problem comes when I ran migration. I get this error:

An error has occurred, all later migrations canceled:

undefined method name' for #<Forem::Forum:0x007fe0ca316520> /Users/apraditya/.rvm/gems/[email protected]/gems/activemodel-3.2.10/lib/active_model/attribute_methods.rb:407:inmethod_missing'

Did I miss something? Thanks for the great work!


Reply to this email directly or view it on GitHubhttps://github.com//issues/366.

@apraditya
Copy link
Author

The error is the output of rake db:migrate

@radar
Copy link
Collaborator

radar commented Jan 7, 2013

Can you run rake db:migrate --trace and show us the output please?

@apraditya
Copy link
Author

Here you go:

(in /Users/apraditya/Projects/MyProject/myapp)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
==  AddFriendlyIdSlugs: migrating =============================================
-- add_column(:forem_forums, :slug, :string)
   -> 0.0201s
-- add_index(:forem_forums, :slug, {:unique=>true})
   -> 0.0175s
rake aborted!
An error has occurred, all later migrations canceled:

undefined method `name' for #<Forem::Forum:0x007fc24262e6c8>
/Users/apraditya/.rvm/gems/[email protected]/gems/activemodel-3.2.10/lib/active_model/attribute_methods.rb:407:in `method_missing'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/attribute_methods.rb:149:in `method_missing'
/Users/apraditya/.rvm/gems/[email protected]/gems/friendly_id-4.0.9/lib/friendly_id/slugged.rb:253:in `should_generate_new_friendly_id?'
/Users/apraditya/.rvm/gems/[email protected]/gems/friendly_id-4.0.9/lib/friendly_id/slugged.rb:273:in `set_slug'
/Users/apraditya/.rvm/gems/[email protected]/gems/activesupport-3.2.10/lib/active_support/callbacks.rb:407:in `_run__1243096130026340265__validation__2316942611818741036__callbacks'
/Users/apraditya/.rvm/gems/[email protected]/gems/activesupport-3.2.10/lib/active_support/callbacks.rb:405:in `__run_callback'
/Users/apraditya/.rvm/gems/[email protected]/gems/activesupport-3.2.10/lib/active_support/callbacks.rb:385:in `_run_validation_callbacks'
/Users/apraditya/.rvm/gems/[email protected]/gems/activesupport-3.2.10/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/apraditya/.rvm/gems/[email protected]/gems/activemodel-3.2.10/lib/active_model/validations/callbacks.rb:53:in `run_validations!'
/Users/apraditya/.rvm/gems/[email protected]/gems/activemodel-3.2.10/lib/active_model/validations.rb:195:in `valid?'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/validations.rb:69:in `valid?'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/validations.rb:77:in `perform_validations'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/validations.rb:56:in `save!'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/transactions.rb:264:in `block in save!'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/transactions.rb:208:in `transaction'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/transactions.rb:264:in `save!'
/Users/apraditya/Projects/MyProject/myapp/db/migrate/20130108023047_add_friendly_id_slugs.forem.rb:7:in `block in change'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/relation/batches.rb:21:in `block (2 levels) in find_each'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/relation/batches.rb:21:in `each'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/relation/batches.rb:21:in `block in find_each'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/relation/batches.rb:72:in `find_in_batches'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/relation/batches.rb:20:in `find_each'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/querying.rb:8:in `find_each'
/Users/apraditya/Projects/MyProject/myapp/db/migrate/20130108023047_add_friendly_id_slugs.forem.rb:7:in `change'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:407:in `block (2 levels) in migrate'
/Users/apraditya/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:407:in `block in migrate'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:389:in `migrate'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:528:in `migrate'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:777:in `call'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:777:in `ddl_transaction'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:719:in `block in migrate'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:700:in `each'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:700:in `migrate'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:570:in `up'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/migration.rb:551:in `migrate'
/Users/apraditya/.rvm/gems/[email protected]/gems/activerecord-3.2.10/lib/active_record/railties/databases.rake:179:in `block (2 levels) in <top (required)>'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/apraditya/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/Users/apraditya/.rvm/gems/[email protected]/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/Users/apraditya/.rvm/gems/[email protected]/bin/rake:19:in `load'
/Users/apraditya/.rvm/gems/[email protected]/bin/rake:19:in `<main>'
/Users/apraditya/.rvm/gems/[email protected]/bin/ruby_noexec_wrapper:14:in `eval'
/Users/apraditya/.rvm/gems/[email protected]/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => db:migrate

@sheam
Copy link

sheam commented Jan 15, 2013

I am experiencing this as well.

@parndt
Copy link
Contributor

parndt commented Jan 15, 2013

@sheam thanks for the confirmation. Hopefully one of us will be able to reproduce this soon :) in the mean time if you find any workaround please let us know as it helps with debugging the issue. Thanks!

@sheam
Copy link

sheam commented Jan 15, 2013

I just confirmed that the issue does not occur with rails 3.2.3, but it does occur with 3.2.11. The issue occurs during rake db:seed, on the following lines of my seeds.db file:

forem_forums = Forem::Forum.create([
{ category_id: 1, title: "Feature Requests", description: "Features that would make your life easier." },
])

Perhaps there is a better way to seed the DB?

@parndt
Copy link
Contributor

parndt commented Jan 15, 2013

Can you double check that you're running friendly_id version 4.0.9?

@sheam
Copy link

sheam commented Jan 15, 2013

yep.

[497]$ bundle show friendly_id
/Users/sheam/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/friendly_id-4.0.9

@sheam
Copy link

sheam commented Jan 15, 2013

I notice the forem version is (1.0.0.beta1) from git://github.com/radar/forem.git (at master) , should I try a different version?

@parndt
Copy link
Contributor

parndt commented Jan 15, 2013

The latest should show as 1.0.0.beta1.

We don't really use the version in Forem. :)

@sheam
Copy link

sheam commented Jan 15, 2013

Ignoring the seed error (as I am just creating forums), if I start the app, and try to go to the forums index I get the dreaded:

NoMethodError in Forem/forums#index

Showing /Users/sheam/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/forem-9b9c15ecbbbb/app/views/forem/categories/_category.html.erb where line #1 raised:

undefined method `can_read_forem_forums?' for #User:0x007f915b79ace0

This does not happen with rails 3.2.3 either.
This is preventing a deployment because of the security vulnerabilities in rails < 3.2.11.

@radar
Copy link
Collaborator

radar commented Jan 15, 2013

@sheam: That seems like a completely different error, like the decorators that add that method to the User class aren't being loaded. Could you please open a new issue with some steps to reproduce it within a new app?

@parndt
Copy link
Contributor

parndt commented Jan 15, 2013

I'm reproducing this issue with can_read_forem_forums?.. I'll see if I can fix it.

@parndt parndt closed this as completed in d7ed4d2 Jan 15, 2013
@parndt
Copy link
Contributor

parndt commented Jan 15, 2013

Please try bundle update forem, your problems should be solved.

@radar radar reopened this Jan 15, 2013
@radar
Copy link
Collaborator

radar commented Jan 15, 2013

@parndt That only fixes @sheam's "tangent" issue.

The migration issue is still aproblem I reckon.

@radar radar closed this as completed Jan 15, 2013
@radar radar reopened this Jan 15, 2013
@parndt
Copy link
Contributor

parndt commented Jan 15, 2013

OK Confirm. This was caused by friendly_id not being version 4.0.9.. see my successful reproduce:

12:03:20: [master±|1.9.3p327] ~/sandbox/apptest1_forem$ rake forem:install:migrations
NOTE: Migration 20120616193446_add_forem_admin.rb from forem has been skipped. Migration with the same name already exists.
NOTE: Migration 20120616193447_add_forem_state.rb from forem has been skipped. Migration with the same name already exists.
Copied migration 20130115230338_add_forem_auto_subscribe.forem.rb from forem
Copied migration 20130115230339_add_friendly_id_slugs.forem.rb from forem
Copied migration 20130115230340_rename_title_to_name_on_forem_forums.forem.rb from forem
12:03:38: [master±|1.9.3p327] ~/sandbox/apptest1_forem$ rake db:migrate
==  AddForemAutoSubscribe: migrating ==========================================
-- column_exists?(:users, :forem_auto_subscribe)
   -> 0.0006s
==  AddForemAutoSubscribe: migrated (0.0092s) =================================

==  AddFriendlyIdSlugs: migrating =============================================
-- add_column(:forem_forums, :slug, :string)
   -> 0.0005s
-- add_index(:forem_forums, :slug, {:unique=>true})
   -> 0.0005s
-- add_column(:forem_categories, :slug, :string)
   -> 0.0003s
-- add_index(:forem_categories, :slug, {:unique=>true})
   -> 0.0003s
-- add_column(:forem_topics, :slug, :string)
   -> 0.0004s
-- add_index(:forem_topics, :slug, {:unique=>true})
   -> 0.0042s
==  AddFriendlyIdSlugs: migrated (0.2223s) ====================================

==  RenameTitleToNameOnForemForums: migrating =================================
-- rename_column(:forem_forums, :title, :name)
   -> 0.0051s
==  RenameTitleToNameOnForemForums: migrated (0.0051s) ========================

12:03:44: [master±|1.9.3p327] ~/sandbox/apptest1_forem$ cat Gemfile.lock  | grep friendly_id
      friendly_id (~> 4.0)
    friendly_id (4.0.9)

@parndt parndt closed this as completed in 9b72013 Jan 15, 2013
@sheam
Copy link

sheam commented Jan 15, 2013

Now I get no such column: name. I am guessing this is because 'title' go renamed to 'name'. I have to run, but will a migration which renames the 'title' column to 'name' fix this? Or do I have to run rails g forem:install again to regenerate my forem models. If I have to run form:install again, are there files I should delete beforehand?

@radar
Copy link
Collaborator

radar commented Jan 15, 2013

@sheam How are you getting that error? Do you have an app we could use to reproduce it?

@sheam
Copy link

sheam commented Jan 16, 2013

I get the error during the seeding of the DB. In my schema.rb, the form_forums table has a title, and not name. I think you guys have renamed title column to name a few month ago.

I do not want my code public at this point, but if I can zip up my working directory and send it to you I will. Or if you have a place to upload it to... I don't think you would reproduce the error by getting a fresh copy of my code from bit bucket, as the problem now seems to have to do with the upgrade. But I can also send you a fresh copy.

@parndt
Copy link
Contributor

parndt commented Jan 16, 2013

Hmm okay. I think best for you is just to manually change forem_forums to have name and not title thus solving this issue for you. I don't think that others will get this, personally. :-)

@sheam
Copy link

sheam commented Jan 16, 2013

class RenameTitleToNameInForemForums < ActiveRecord::Migration
def change
rename_column :forem_forums, :title, :name
end
end

This fixed the migration issue.

I am bug free, going to try and deploy to heroku now. Thanks for the amazing response time guys.

@abrambailey
Copy link

I am experiencing this issue as well. Upgrading Forem gem. I tried deleting the initializer, just in case, but still a no-go. Rails 3.2.11 and 3.2.13.rc1 were both tested producing the following errors:

funkdified@vizio ~/rails_projects/goodsounds $ rails g forem:install
The method 'YAML.enable_arbitrary_object_deserialization!' is deprecated and will be removed in the next release of SafeYAML -- set the SafeYAML::OPTIONS[:default_mode] to either :safe or :unsafe.
Copying over Forem migrations...
The method 'YAML.enable_arbitrary_object_deserialization!' is deprecated and will be removed in the next release of SafeYAML -- set the SafeYAML::OPTIONS[:default_mode] to either :safe or :unsafe.
What is your user class called? [User] 
What is the current_user helper called in your app? [current_user] 
Defining forem_user method inside ApplicationController...
      insert  app/controllers/application_controller.rb
Adding forem initializer (config/initializers/forem.rb)...
      create  config/initializers/forem.rb
Running rake db:migrate
The method 'YAML.enable_arbitrary_object_deserialization!' is deprecated and will be removed in the next release of SafeYAML -- set the SafeYAML::OPTIONS[:default_mode] to either :safe or :unsafe.
rake aborted!
An error has occurred, this and all later migrations canceled:

undefined method `name' for #<Forem::Forum:0x0000000643b6a0>
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activemodel-3.2.13.rc1/lib/active_model/attribute_methods.rb:407:in `method_missing'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/attribute_methods.rb:149:in `method_missing'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/friendly_id-4.0.9/lib/friendly_id/slugged.rb:253:in `should_generate_new_friendly_id?'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/friendly_id-4.0.9/lib/friendly_id/slugged.rb:273:in `set_slug'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:407:in `_run__563395518242889671__validation__284587739523264369__callbacks'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:385:in `_run_validation_callbacks'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activemodel-3.2.13.rc1/lib/active_model/validations/callbacks.rb:53:in `run_validations!'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activemodel-3.2.13.rc1/lib/active_model/validations.rb:195:in `valid?'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/validations.rb:69:in `valid?'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/validations.rb:77:in `perform_validations'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/validations.rb:56:in `save!'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:264:in `block in save!'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:208:in `transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:264:in `save!'
/home/funkdified/rails_projects/goodsounds/db/migrate/20130304095539_add_friendly_id_slugs.forem.rb:7:in `block in change'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/relation/batches.rb:21:in `block (2 levels) in find_each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/relation/batches.rb:21:in `each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/relation/batches.rb:21:in `block in find_each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/relation/batches.rb:72:in `find_in_batches'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/relation/batches.rb:20:in `find_each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/querying.rb:8:in `find_each'
/home/funkdified/rails_projects/goodsounds/db/migrate/20130304095539_add_friendly_id_slugs.forem.rb:7:in `change'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:407:in `block (2 levels) in migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:407:in `block in migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:389:in `migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:528:in `migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:775:in `call'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:775:in `block in ddl_transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:208:in `transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:775:in `ddl_transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:719:in `block in migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:700:in `each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:700:in `migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:570:in `up'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:551:in `migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/railties/databases.rake:193:in `block (2 levels) in <top (required)>'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/bin/ruby_noexec_wrapper:14:in `eval'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Creating default forum and topic
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activemodel-3.2.13.rc1/lib/active_model/attribute_methods.rb:407:in `method_missing': undefined method `slug' for #<Forem::Category:0x00000005a4f358> (NoMethodError)
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/attribute_methods.rb:149:in `method_missing'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/friendly_id-4.0.9/lib/friendly_id/slugged.rb:254:in `should_generate_new_friendly_id?'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/friendly_id-4.0.9/lib/friendly_id/slugged.rb:273:in `set_slug'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:407:in `_run__890784409947547824__validation__472458083015239509__callbacks'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:405:in `__run_callback'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:385:in `_run_validation_callbacks'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:81:in `run_callbacks'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activemodel-3.2.13.rc1/lib/active_model/validations/callbacks.rb:53:in `run_validations!'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activemodel-3.2.13.rc1/lib/active_model/validations.rb:195:in `valid?'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/validations.rb:69:in `valid?'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/validations.rb:77:in `perform_validations'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/validations.rb:50:in `save'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/attribute_methods/dirty.rb:22:in `save'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:259:in `block (2 levels) in save'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:208:in `transaction'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:259:in `block in save'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:258:in `save'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/persistence.rb:45:in `create'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/bundler/gems/forem-80f44dc62d77/db/seeds.rb:1:in `<top (required)>'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/dependencies.rb:245:in `load'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/dependencies.rb:245:in `block in load'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/dependencies.rb:245:in `load'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/railties-3.2.13.rc1/lib/rails/engine.rb:520:in `load_seed'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/railties-3.2.13.rc1/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/bundler/gems/forem-80f44dc62d77/lib/generators/forem/install_generator.rb:67:in `seed_database'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/thor-0.17.0/lib/thor/task.rb:27:in `run'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/thor-0.17.0/lib/thor/invocation.rb:120:in `invoke_task'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/thor-0.17.0/lib/thor/invocation.rb:126:in `block in invoke_all'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/thor-0.17.0/lib/thor/invocation.rb:126:in `each'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/thor-0.17.0/lib/thor/invocation.rb:126:in `map'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/thor-0.17.0/lib/thor/invocation.rb:126:in `invoke_all'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/thor-0.17.0/lib/thor/group.rb:238:in `dispatch'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/thor-0.17.0/lib/thor/base.rb:434:in `start'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/railties-3.2.13.rc1/lib/rails/generators.rb:171:in `invoke'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/railties-3.2.13.rc1/lib/rails/commands/generate.rb:12:in `<top (required)>'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/dependencies.rb:251:in `require'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/dependencies.rb:251:in `block in require'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/dependencies.rb:251:in `require'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/railties-3.2.13.rc1/lib/rails/commands.rb:29:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
funkdified@vizio ~/rails_projects/goodsounds $ rake db:migrate --trace
The method 'YAML.enable_arbitrary_object_deserialization!' is deprecated and will be removed in the next release of SafeYAML -- set the SafeYAML::OPTIONS[:default_mode] to either :safe or :unsafe.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Invoke rails_admin:disable_initializer (first_time)
** Execute rails_admin:disable_initializer
[RailsAdmin] RailsAdmin initialization disabled by default. Pass SKIP_RAILS_ADMIN_INITIALIZER=false if you need it.
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
==  AddFriendlyIdSlugs: migrating =============================================
-- add_column(:forem_forums, :slug, :string)
   -> 0.0017s
-- add_index(:forem_forums, :slug, {:unique=>true})
   -> 0.0145s
rake aborted!
An error has occurred, this and all later migrations canceled:

undefined method `name' for #<Forem::Forum:0x00000006a9b338>
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activemodel-3.2.13.rc1/lib/active_model/attribute_methods.rb:407:in `method_missing'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/attribute_methods.rb:149:in `method_missing'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/friendly_id-4.0.9/lib/friendly_id/slugged.rb:253:in `should_generate_new_friendly_id?'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/friendly_id-4.0.9/lib/friendly_id/slugged.rb:273:in `set_slug'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:407:in `_run__1158354388849815308__validation__4093704708519925776__callbacks'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:385:in `_run_validation_callbacks'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activesupport-3.2.13.rc1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activemodel-3.2.13.rc1/lib/active_model/validations/callbacks.rb:53:in `run_validations!'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activemodel-3.2.13.rc1/lib/active_model/validations.rb:195:in `valid?'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/validations.rb:69:in `valid?'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/validations.rb:77:in `perform_validations'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/validations.rb:56:in `save!'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:264:in `block in save!'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:208:in `transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:264:in `save!'
/home/funkdified/rails_projects/goodsounds/db/migrate/20130304095539_add_friendly_id_slugs.forem.rb:7:in `block in change'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/relation/batches.rb:21:in `block (2 levels) in find_each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/relation/batches.rb:21:in `each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/relation/batches.rb:21:in `block in find_each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/relation/batches.rb:72:in `find_in_batches'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/relation/batches.rb:20:in `find_each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/querying.rb:8:in `find_each'
/home/funkdified/rails_projects/goodsounds/db/migrate/20130304095539_add_friendly_id_slugs.forem.rb:7:in `change'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:407:in `block (2 levels) in migrate'
/home/funkdified/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:407:in `block in migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:389:in `migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:528:in `migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:775:in `call'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:775:in `block in ddl_transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/transactions.rb:208:in `transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:775:in `ddl_transaction'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:719:in `block in migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:700:in `each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:700:in `migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:570:in `up'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/migration.rb:551:in `migrate'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/gems/activerecord-3.2.13.rc1/lib/active_record/railties/databases.rake:193:in `block (2 levels) in <top (required)>'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/home/funkdified/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/bin/rake:19:in `load'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@global/bin/rake:19:in `<main>'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/bin/ruby_noexec_wrapper:14:in `eval'
/home/funkdified/.rvm/gems/ruby-1.9.3-p385@goodsounds/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => db:migrate
funkdified@vizio ~/rails_projects/goodsounds $ 

Please help

@abrambailey
Copy link

Hi, seems no one is keen to help with this..

I figured out this issue, and would suggest that you fix the project...

The rename_column :forem_forums, :title, :name migration was being run in the wrong order... and needed to be placed earlier in the migration queue.. I had to manually run the migration and then re-generate the new upgrade migrations using rails g forem:install

Everything is working fine now.

@radar
Copy link
Collaborator

radar commented Mar 9, 2013

@funkdified We are actually keen to help out on this problem.

The issue is that if we can't reproduce it on our machines, then we can't verify that it's actually fixed. So if you can give us some easy steps to reproduce a problem accurately on our machines, we can identify the problem and then fix it.

Thank you.

@abrambailey
Copy link

@radar Oops, sorry to sound so negative, just saw your response and realized I sounded bad! I think I was just frustrated. Anyway, hope what I said was helpful.

@pwalker
Copy link

pwalker commented Apr 25, 2013

@radar I followed funkdified's suggestion about the migrations, and it solved this issue for me. When I ran rake forem:install:migrations it gave me these 3 files:

20130424162426_add_forem_auto_subscribe.forem.rb
20130424162427_add_friendly_id_slugs.forem.rb
20130424162428_rename_title_to_name_on_forem_forums.forem.rb

but this would error out (I think the auto_subscribe migration had already succeeded, and is not a part of the problem):

==  AddFriendlyIdSlugs: migrating =============================================
-- add_column(:forem_forums, :slug, :string)
   -> 0.0974s
-- add_index(:forem_forums, :slug, {:unique=>true})
   -> 0.2143s
rake aborted!
An error has occurred, this and all later migrations canceled:

undefined method `name' for #<Forem::Forum:0x00000005932f10>/app/vendor/bundle/ruby/1.9.1/gems/activemodel-3.2.13/lib/active_model/attribute_methods.rb:407:in `method_missing'

I changed the timestamp in the rename_title migration to end in a 5, thus placing it before the others, and then my rake db:migrate succeeded.

Perhaps when I upgraded forem, I upgraded too many versions at once? thus the rake forem:install:migrations task inserted too many migrations and in the wrong order? I think that the add_friendly_id migration needs to happen after the rename_title.

Hope this helps reproduce the bug.

@acarr468
Copy link

I just had this issue as well for Rails 4, and the above solution fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants