Calling `Rake db:reset` causes `NoMethodError`


(Danny) #1

Calling rake db:reset causes a NoMethodError. Output shown below:

-- enable_extension("plpgsql")
   -> 0.0110s
-- enable_extension("uuid-ossp")
   -> 0.0020s
-- create_table("push_type_assets", {:id=>:uuid, :default=>"uuid_generate_v4()", :force=>:cascade})
   -> 0.0156s
-- create_table("push_type_node_hierarchies", {:id=>false, :force=>:cascade})
   -> 0.0033s
-- add_index("push_type_node_hierarchies", ["ancestor_id", "descendant_id", "generations"], {:name=>"node_anc_desc_idx", :unique=>true, :using=>:btree})
   -> 0.0042s
-- add_index("push_type_node_hierarchies", ["descendant_id"], {:name=>"node_desc_idx", :using=>:btree})
   -> 0.0035s
-- create_table("push_type_nodes", {:id=>:uuid, :default=>"uuid_generate_v4()", :force=>:cascade})
   -> 0.0063s
-- create_table("push_type_users", {:id=>:uuid, :default=>"uuid_generate_v4()", :force=>:cascade})
   -> 0.0099s
-- add_index("push_type_users", ["email"], {:name=>"index_push_type_users_on_email", :unique=>true, :using=>:btree})
   -> 0.0031s
-- add_index("push_type_users", ["reset_password_token"], {:name=>"index_push_type_users_on_reset_password_token", :unique=>true, :using=>:btree})
   -> 0.0031s
-- initialize_schema_migrations_table()
   -> 0.0022s
-- enable_extension("plpgsql")
   -> 0.0002s
-- enable_extension("uuid-ossp")
   -> 0.0000s
-- create_table("push_type_assets", {:id=>:uuid, :default=>"uuid_generate_v4()", :force=>:cascade})
rake aborted!
NoMethodError: undefined method `uuid' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x005648fcc79318>
/home/daniel/Data/RubyOnRails/YoutubeBlog/db/schema.rb:27:in `block (2 levels) in <top (required)>'
/home/daniel/Data/RubyOnRails/YoutubeBlog/db/schema.rb:20:in `block in <top (required)>'
/home/daniel/Data/RubyOnRails/YoutubeBlog/db/schema.rb:14:in `<top (required)>'
Tasks: TOP => db:schema:load
(See full trace by running task with --trace)

I have no custom migrations and I am on PushType 0.9.0 for now as I cannot start the server on 0.10.2 as detailed in this issue.


(Aaron Russell) #2

No idea. :stuck_out_tongue:

Is this specifically the db:schema:load task that is failing? Does rake db:drop db:create db:migrate work OK?


(Danny) #3

Only rake db:schema:load fails. The other tasks work fine.