Open axoline opened 10 years ago
Looking into it -- 'works for me', but that doesn't mean anything. ;-)
I know how that goes!
I'm using sqlite at the moment. Here's more:
$ rake db:migrate == Sr25Schema: migrating ===================================================== -- create_table(:food_ndb_foods, {:id=>false, :primary_key=>:nutrient_databank_number}) -> 0.0672s -- add_index(:food_ndb_foods, :nutrient_databank_number, {:unique=>true}) -> 0.0013s -- add_index(:food_ndb_foods, :food_group_code) -> 0.0053s -- create_table(:food_ndb_food_groups, {:id=>false, :primary_key=>:code}) -> 0.0016s -- add_index(:food_ndb_food_groups, :code, {:unique=>true}) -> 0.0012s -- create_table(:food_ndb_foods_languals, {:id=>false}) -> 0.0125s -- add_index(:food_ndb_foods_languals, [:nutrient_databank_number, :langual_code], {:name=>"by_ndbn_and_langual", :unique=>true}) -> 0.0007s -- create_table(:food_ndb_languals, {:id=>false, :primary_key=>:code}) -> 0.0019s -- add_index(:food_ndb_languals, :code, {:unique=>true}) -> 0.0009s -- create_table(:food_ndb_food_nutrients, {:id=>false}) -> 0.0032s -- add_index(:food_ndb_food_nutrients, [:nutrient_databank_number, :nutrient_number], {:name=>"by_food_and_nutrient", :unique=>true}) -> 0.0011s -- add_index(:food_ndb_food_nutrients, :derivation_code) -> 0.0016s -- add_index(:food_ndb_food_nutrients, :source_code) -> 0.0016s -- create_table(:food_ndb_nutrients, {:id=>false, :primary_key=>:number}) -> 0.0018s -- add_index(:food_ndb_nutrients, :number, {:unique=>true}) -> 0.0060s -- create_table(:food_ndb_sources, {:id=>false, :primary_key=>:code}) -> 0.0011s -- add_index(:food_ndb_sources, :code, {:unique=>true}) -> 0.0006s -- create_table(:food_ndb_derivations, {:id=>false, :primary_key=>:code}) -> 0.0010s -- add_index(:food_ndb_derivations, :code, {:unique=>true}) -> 0.0014s -- create_table(:food_ndb_weights, {:id=>false}) -> 0.0033s -- add_index(:food_ndb_weights, [:nutrient_databank_number, :sequence], {:unique=>true, :name=>"index_food_ndb_weights_on_nutrient_databank_number_and_seq"}) -> 0.0013s -- create_table(:food_ndb_footnotes, {:id=>false}) -> 0.0146s -- add_index(:food_ndb_footnotes, [:nutrient_databank_number, :sequence], {:name=>"by_food_and_sequence"}) -> 0.0087s -- create_table(:food_ndb_food_nutrients_data_sources, {:id=>false}) -> 0.0014s -- add_index(:food_ndb_food_nutrients_data_sources, [:nutrient_databank_number, :nutrient_number, :data_source_id], {:name=>"by_food_nutrient_and_data_source", :unique=>true}) -> 0.0006s -- create_table(:food_ndb_data_sources, {:id=>false, :primary_key=>:id}) -> 0.0008s -- add_index(:food_ndb_data_sources, :id, {:unique=>true}) -> 0.0005s == Sr25Schema: migrated (0.1571s) ============================================
$ rake food_ndb:db:seed Importing foods..........8463 Importing food groups............25 Importing foods_languals join table..........38804 Importing languals..........774 Importing nutrients.....................150 Importing data_sources.........570 Importing food_nutrients_data_sources join table..........213658 Importing food_nutrientsrake aborted! undefined method `primary_keys=' for #Class:0x007f99097e8408
Tasks: TOP => food_ndb:db:seed (See full trace by running task with --trace)
Any idea how to fix this?
$ rake food_ndb:db:seed Importing foods..........8463 Importing food groups............25 Importing foods_languals join table..........38804 Importing languals..........774 Importing nutrients.....................150 Importing data_sources.........570 Importing food_nutrients_data_sources join table..........213658 Importing food_nutrientsrake aborted! undefined method `primary_keys=' for #Class:0x007f8cce1b07d0
Tasks: TOP => food_ndb:db:seed (See full trace by running task with --trace)