Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9110517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:17:19+00:00 2026-06-17T03:17:19+00:00

I already found some people fixing this issue modifying the attr_accessible but I think

  • 0

I already found some people fixing this issue modifying the attr_accessible but I think this error might be in the gem rake itself?

rake --trace db:seed

— log output begin —

** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:abort_if_pending_migrations
rake aborted!
Can't mass-assign protected attributes: authentication_token
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activemodel-3.2.8/lib/active_model/mass_assignment_security/sanitizer.rb:48:in `process_removed_attributes'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activemodel-3.2.8/lib/active_model/mass_assignment_security/sanitizer.rb:20:in `debug_protected_attribute_removal'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activemodel-3.2.8/lib/active_model/mass_assignment_security/sanitizer.rb:12:in `sanitize'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activemodel-3.2.8/lib/active_model/mass_assignment_security.rb:230:in `sanitize_for_mass_assignment'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activerecord-3.2.8/lib/active_record/attribute_assignment.rb:75:in `assign_attributes'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activerecord-3.2.8/lib/active_record/base.rb:498:in `initialize'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activerecord-3.2.8/lib/active_record/persistence.rb:44:in `new'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activerecord-3.2.8/lib/active_record/persistence.rb:44:in `create'
/Users/devx/passbook_rails_example/db/seeds.rb:1:in `<top (required)>'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `block in load'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.8/lib/rails/engine.rb:520:in `load_seed'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:309:in `block (2 levels) in <top (required)>'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/devx/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/bin/rake:19:in `load'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/bin/rake:19:in `<main>'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `eval'
/Users/devx/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => db:seed

— log output end —

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T03:17:20+00:00Added an answer on June 17, 2026 at 3:17 am

    This is not at all related to rake, as you said it’s a MassAssignment issue, and that can be fixed modifying the attr_accessible of the related model.

    What actually happens here is that the seed task executed by rake tries to create models (I guess User), and it seems the hash params given to User.create contain an authentication_token key, it should looks like the following:

    User.create name: 'foo', email: 'mail@bar.com', authentication_token: 'qfgsdgf' ...
    

    But your User model doesn’t have :authentication_token in its attr_accessible list, so that’s why it’s throwing this error when trying to create the User.

    If you just want a warning instead of an exception when facing MassAssignment issues, you can change the config :

    in config/environment/{development,test,production}.rb

    config.active_record.mass_assignment_sanitizer = :strict
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have found already some similar discussion on this, but would like to investigate
Have found already some people asking the same, but the solutions didn't work for
Already found this page with some helpful hints. Problem is I need to debug
This is my first question, but I've already found this site extremely helpful, so
I see a lot of people have this problem, but none answer I found
Has someone already found some tweaks to improve the compilation speed of Play 2.0?
I have already gone through some codings, and I found some interrupts in uploading.
I've already found the following question , but I was wondering if there was
The title is my question. I already found a topic related to this here
There are already some questions about dependency managers here, but it seems to me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.