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 532395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:24:00+00:00 2026-05-13T09:24:00+00:00

Since a short time my rails applications yields the following runtime error in the

  • 0

Since a short time my rails applications yields the following runtime error in the test suite:

RuntimeError: Declare either attr_protected or attr_accessible for User, but not both.

This was probably introduced by an update to restful_authentication. But scanning the code for “attr_protected” only shows me it is never called. So why this error message?

My user model only has the following code:

attr_accessible :login, :email, :name, :password, :password_confirmation, :identity_url

So it should be perfectly okay? Any clues where to look for the problem? Searching google shows a few clueless people who also see this problem only in test environment and sporadically in the development environment.

  • 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-05-13T09:24:01+00:00Added an answer on May 13, 2026 at 9:24 am

    If you are using RestfulAuthentication with friendly_id, the latest version of friendly_id can bring this error as indicated on the github page:

    Also, this feature uses attr_protected to protect the cached_slug column, unless you have already invoked attr_accessible. So if you wish to use attr_accessible, you must invoke it BEFORE you invoke has_friendly_id in your class.
    github page

    Also, when using grep to find occurences of keywords, don’t forget to grep also in gems as you may have installed some plugins as gem archive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Its been a while since I worked in asp.net and a very long time
I am having a hard time managing the storage and access of a large
This is my first time using any sort of version control (git) and excited
IN SHORT: I want to execute a new command 3 sec after the former
AFAIK profilers can only tell how much time is spent in each function. But
Ruby's date/time helpers are useful but I found a discrepancy. It seems that 12.months
Short version: is it safe to use ets:foldl to delete every ETS record as
Given: class Buf { // has fixed buffer size, forming a cyclic buffer tor
In my Java EE 6-webapp (running on latest GlassFish 3.1), I'm using JSF2-ManagedBeans and
I'm using JBoss 5.1.0 GA together with Hibernate and I'm now trying to enable

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.