Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Build a Simple Ruby on Rails Application Creating an Authentication System Generating the Devise Views

Yevhen Grinman
Yevhen Grinman
4,346 Points

How to change unsupported attr_accessible?

So I am getting the following message (as probably most of the people who follow this tutorial right now):

attr_accessibleis extracted out of Rails into a gem. Please use new recommended protection model for params(strong_parameters) or addprotected_attributes` to yourGemfile to use old one. (RuntimeError)

I tried to downgrade to use old gem, but it doesn't make sense to do this. So how can one use 'strong parameters'? There are quite a few discussions online, I just wanted to know how to do this in the context of this specific app.


  • Yevhen

2 Answers

David Curtis
David Curtis
11,301 Points

I hope that fix works for you. When I got to devise, I had to go back and start all over using 1.9.3 and an older version of rails (I started w/ ruby 2.0 and I think rails 4.0). That did the trick for me. If you do start over, don't run "gem update" at any time during this project. Good luck.