heroku - Ruby on Rails: undefined method 'role' for Class -
i'm haing problem in ruby on rails application. have entity called 'hairdresser', properties:
irb(main):003:0> hairdresser => hairdresser(id: integer, name: string, surname: string, email: string, auth_token: string, password_digest: string, created_at: datetime, updated_at: datetime, facebook_id: string, first_login: boolean, role: string)
i created scaffold in order create new hairdresser entities, when click on "new hairdresser" following error:
2016-03-17t09:14:43.063793+00:00 app[web.1]: actionview::template::error (undefined method `role' #<hairdresser:0x007f9e20f2bc30>): 2016-03-17t09:14:43.063794+00:00 app[web.1]: 25: </div> 2016-03-17t09:14:43.063794+00:00 app[web.1]: 26: <div class="field"> 2016-03-17t09:14:43.063795+00:00 app[web.1]: 27: <%= f.label :role %><br> 2016-03-17t09:14:43.063795+00:00 app[web.1]: 28: <%= f.text_field :role %> 2016-03-17t09:14:43.063795+00:00 app[web.1]: 29: </div>
role property added after creation of scaffold, added supposed added (i think):
view/hairdressers/_form.html.erb
<div class="field"> <%= f.label :role %><br> <%= f.text_field :role %> </div>
view/hairdressers/index.html.erb, index.json.jsonbuilder, , in every other /view/hairdressers file.
the local version of application working, have fact heroku loading production environment , on localhost running development environment?
edit: execution of heroku run rake --trace db:migrate
** invoke db:migrate (first_time) ** invoke environment (first_time) ** execute environment ** invoke db:load_config (first_time) ** execute db:load_config ** execute db:migrate activerecord::schemamigration load (0.8ms) select "schema_migrations".* "schema_migrations" ** invoke db:_dump (first_time) ** execute db:_dump
make sure migrations run on heroku. https://devcenter.heroku.com/articles/rake
heroku run rake --trace db:migrate
Comments
Post a Comment