在Ubuntu 16.04.5 LTS上使用“ rake db:migrate”时出错

时间:2018-11-14 17:04:24

标签: ruby-on-rails ruby rubygems rake-task dbmigrate

我正在使用“ rake db:migrate”并得到以下错误消息: 请帮我解决这个问题:

+ (NSString *)urlToMIME:(NSURL *)url {
    CFStringRef fileExtension = (__bridge CFStringRef)[url pathExtension];
    CFStringRef UTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, fileExtension, NULL);
    CFStringRef MIMEType = UTTypeCopyPreferredTagWithClass(UTI, kUTTagClassMIMEType);
    CFRelease(UTI);
    return (__bridge_transfer NSString *)MIMEType;
}

1 个答案:

答案 0 :(得分:2)

您在db/migrate目录中的迁移都应继承自ActiveRecord::Migration[5.2],而不是ActiveRecord::Migration