I've got a cucumber step that is trying to populate objects, including a new column that was just added via a migration. The column is named is_active, and the error is:
unknown attribute: is_active (ActiveRecord::UnknownAttributeError)
which is raised as a result of this line:
city = City.find_or_create_by_name_and_state(:name => attributes['City'], :state => attributes['State'], :icao_code => attributes['ICAO'], :display_order => attributes['Order'], :is_active => attributes['Active'], :current_temperature => attributes['Current'])
The odd thing is that earlier today, I added column display_order, which is working fine.
If I remove the :is_active assignment from the step and add a "puts city.attributes" after the city assignment, is_active is not listed among the attributes. But if I do "City.new.attributes" from the rails console, the is_active attribute is there.
It appears that the cucumber test is not executing in the proper environment, although it is able to see the recent display_order attribute, which is defined only in the dev environment, as is the most recent is_active attribute.
Any ideas how I get cucumber to see the attribute?
Thanks,
Phil