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

rake aborted undefined method `avatar_changed?' for #<User:0x007f62799b7c28> #187

Closed
snowe2010 opened this issue Jan 29, 2014 · 4 comments
Closed

Comments

@snowe2010
Copy link

== Seed from /home/git/gitlab/db/fixtures/production/001_admin.rb
rake aborted!
undefined method `avatar_changed?' for #<User:0x007f62799b7c28>
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:46:in `eval'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/attribute_methods.rb:155:in `method_missing'
/home/git/gitlab/app/models/user.rb:118:in `block in <class:User>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:753:in `_run__4385683779128637065__validate__callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activemodel-4.0.2/lib/active_model/validations.rb:373:in `run_validations!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activemodel-4.0.2/lib/active_model/validations/callbacks.rb:106:in `block in run_validations!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:414:in `block in _run__4385683779128637065__validation__callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:212:in `block in _conditional_callback_around_120'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_model.rb:514:in `block in around_validation'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:150:in `block in run_actions'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:170:in `catch_exceptions'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:148:in `run_actions'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:133:in `run_callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:212:in `run_callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `block (2 levels) in perform'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `catch'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `block in perform'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:186:in `within_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:62:in `perform'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_model.rb:514:in `around_validation'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:283:in `_callback_around_99'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:211:in `_conditional_callback_around_120'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:373:in `_run__4385683779128637065__validation__callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activemodel-4.0.2/lib/active_model/validations/callbacks.rb:106:in `run_validations!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activemodel-4.0.2/lib/active_model/validations.rb:314:in `valid?'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/validations.rb:70:in `valid?'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/validations.rb:77:in `perform_validations'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/validations.rb:51:in `save'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/attribute_methods/dirty.rb:32:in `save'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:270:in `block (2 levels) in save'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:200:in `transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:209:in `transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:270:in `block in save'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:281:in `rollback_active_record_state!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:269:in `save'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:483:in `block in save'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:502:in `block (2 levels) in around_save'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:150:in `block in run_actions'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:170:in `catch_exceptions'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:148:in `run_actions'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:133:in `run_callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:212:in `run_callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `block (2 levels) in perform'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `catch'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `block in perform'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:186:in `within_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:62:in `perform'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:502:in `block in around_save'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:530:in `block in transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:200:in `transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:209:in `transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:529:in `transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:501:in `around_save'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:483:in `save'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/protected_attributes-1.0.5/lib/active_record/mass_assignment_security/persistence.rb:46:in `create'
(eval):1:in `block (2 levels) in run_file'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:46:in `eval'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:46:in `block (2 levels) in run_file'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:58:in `block in open'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:57:in `open'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:57:in `open'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:36:in `block in run_file'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `block in transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:210:in `within_new_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:209:in `transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:35:in `run_file'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:26:in `block in run'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:25:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu/runner.rb:25:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/seed-fu.rb:29:in `seed'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.0/lib/tasks/seed_fu.rake:36:in `block (2 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/setup.rake:18:in `setup_db'
/home/git/gitlab/lib/tasks/gitlab/setup.rake:4:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:seed_fu
(See full trace by running task with --trace)

After running
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production

It looks like it's tied to https://github.com/gitlabhq/gitlabhq/blob/master/app/models/user.rb#L118

@axilleas
Copy link
Contributor

Did you follow the new Centos guide?

@snowe2010
Copy link
Author

Yes

@snowe2010
Copy link
Author

I switched to the master branch and it fixed the problem.

@axilleas
Copy link
Contributor

Strange, on 6.5.1 I did not encounter this. Glad you got it sorted.

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

No branches or pull requests

2 participants