0

when i'm following this guide gcm_on_rails, i get some error

when i try execute 'rails generate gcm_migrations' on my console, i get error like below :

while trying to load the gem 'gcm_on_rails'.
Gem Load Error is: undefined method `attr_accessible' for #<Class:0x0000000121c298>
Did you mean?  attr_accessor

how to fix it? i'm trying to implements google cloud messaging on browser

need help

monoy suronoy
  • 881
  • 5
  • 10
  • 19

1 Answers1

-1

As mentioned in A Guide for Upgrading Ruby on Rails:

Rails 4.0 has removed attr_accessible and attr_protected feature in favor of Strong Parameters.

So if you're into Rails 4.0, you can use Protected Attributes gem for a smooth upgrade path or you can also do what was suggested in this related SO post - Undefined Method attr_accessible by using strong parameters.

I hope those given options work for you.

Community
  • 1
  • 1
Teyam
  • 7,686
  • 3
  • 15
  • 22