Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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.