ruby on rails - db:seed is throwing an error -


i'm using ruby 1.9.2 rails 3.0.9.

whenever try execute rake db:seed throws following error:

rake aborted! uninitialized constant employeecategory 

i've disabled threadsafe , enabled 'dependency_loading in config/application.rb file.

config.threadsafe! unless $rails_rake_task config.dependency_loading = true 

but still not working.

here's content of seed.rb file

studentcategory.destroy_all studentcategory.create([  {:name=>"obc",:is_deleted=>false},  {:name=>"general",:is_deleted=>false} ])  employeecategory.create([ {:name => 'management',:prefix => 'mgmt',:status => true}, {:name => 'teaching',:prefix => 'tcr',:status => true}, {:name => 'fedena admin',:prefix => 'admin',:status => true}, {:name => 'non-teaching',:prefix => 'ntcr',:status => true} ]) employeeposition.create([ {:name => 'principal',:employee_category_id => 2,:status => true}, {:name => 'jr.teacher',:employee_category_id => 3,:status => true}, {:name => 'clerk',:employee_category_id => 4,:status => true} ]) 

this may obvious one, have employee_category.rb model created in /models? found every time error create view, controller, , route, forget simple adding model file.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -