ruby - Heroku, Rails, and ActiveUUID -- Heroku using old migration files? -


i'm getting pg::undefinedfunction: error: function uuid_generate_v4() not exist error when try heroku rake db:migrate rails 4 app.

i using sqlite rails app , wanted use uuids, had activeuuid gem installed. when realized had switch postgres heroku, went , removed activeuuid generation functions migration files, went this:

     create_table :users, :id => false |t|      t.uuid :id, :primary_key => true, null: false, :limit => 32      t.string :name, null: false 

to this:

     create_table :users, :id => :uuid |t|      t.string :name, null: false 

i removed activeuuid gem gem file , deleted reference in models. followed git add ., git commit, , git push heroku master. reinstalled heroku tool belt, can't rid of error.

i had uuid helper file in lib folder. deleted , pushed. however, when cloned copy of heroku repo see contents, helper file still there.

sorry if i've missed obvious. learned heroku 2 days ago , still total beginner rails.

in postgres command line, enter:

create extension "uuid-ossp"; 

this enable postgres uuid extension available use.


Comments