ruby on rails - Rake fixtures not populating correctly -



ruby on rails - Rake fixtures not populating correctly -

i downloaded rails codebase on windows. when seek run functional tests fixtures aren't beingness initialized, errors like:

field 'created_at' doesn't have default value: insert `mytable` (`name`, `code`) values ('mystring', 'mystring')

it's record_timestamps set false, explicitly setting true in config/test.rb makes no difference. tests work correctly on linux machine. how can fixtures load properly?

the issue follows: name of model object failed pluralized, "mytables" instead of "mytable". fixtures.rb makes phone call constantize find name of class, ordinarily raises nameerror exception when fails, in fixture exception swallowed. pluralized model object raised exception , fixture unable determine class trying create. without info didn't seek add together timestamps insert statement - or labels or primary keys matter - , error thrown.

i imagine error message have been different if code had been in different order. maybe difference between running on linux , running on windows.

ruby-on-rails ruby fixtures

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -