Ruby on rails 带heroku和回形针的回形针,迁移失败

Ruby on rails 带heroku和回形针的回形针,迁移失败,ruby-on-rails,ruby,heroku,ffmpeg,paperclip,Ruby On Rails,Ruby,Heroku,Ffmpeg,Paperclip,我创建了一个RubyonRails应用程序,并使用回形针处理文件上传。 回形针在我本地的机器上很好用。但当我部署到Heroku时,我的视频上传停止工作。有人知道出了什么问题吗。当我试图上传一段视频时,也会出现一个错误,该视频文件名不存在。照片上传可以,但视频不行,我用的是带有嵌套属性和ffmpeg的回形针 上传错误日志: Paperclip::Error (Asset model missing required attr_accessor for 'video_file_name') 2013

我创建了一个RubyonRails应用程序,并使用回形针处理文件上传。 回形针在我本地的机器上很好用。但当我部署到Heroku时,我的视频上传停止工作。有人知道出了什么问题吗。当我试图上传一段视频时,也会出现一个错误,该视频文件名不存在。照片上传可以,但视频不行,我用的是带有嵌套属性和ffmpeg的回形针

上传错误日志

Paperclip::Error (Asset model missing required attr_accessor for 'video_file_name')
2013-12-02T14:38:16.867747+00:00 app[web.1]: Paperclip::Error (Asset model missing required attr_accessor for 'video_file_name'):
2013-12-02T14:38:16.867747+00:00 app[web.1]:   app/controllers/projects_controller.rb:60:in `block in update'
2013-12-02T14:38:16.867747+00:00 app[web.1]:   app/controllers/projects_controller.rb:59:in `update'
这是我的迁移错误:

Migrating to AddAttachmentPhotoToAssets (20131021134721)
==  AddAttachmentPhotoToAssets: migrating =====================================
-- change_table(:assets)
   -> 0.0273s
==  AddAttachmentPhotoToAssets: migrated (0.0276s) ============================

Migrating to AddProjectIdToAssets (20131022082744)
-- add_column(:assets, :project_id, :integer)
PG::DuplicateColumn: ERROR:  column "project_id" of relation "assets" already exists
: ALTER TABLE "assets" ADD COLUMN "project_id" integer
-- add_column(:assets, :project_id, :integer)
PG::DuplicateColumn: ERROR:  column "project_id" of relation "assets" already exists
: ALTER TABLE "assets" ADD COLUMN "project_id" integer
rake aborted!
PG::DuplicateColumn: ERROR:  column "project_id" of relation "assets" already exists
: ALTER TABLE "assets" ADD COLUMN "project_id" integer
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `exec'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:425:in `block in log'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:420:in `log'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:127:in `execute'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:360:in `add_column'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/schema_statements.rb:379:in `add_column'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:625:in `block in method_missing'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:597:in `block in say_with_time'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:597:in `say_with_time'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:617:in `method_missing'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:383:in `method_missing'
/app/db/migrate/20131022082744_add_project_id_to_assets.rb:2:in `<class:AddProjectIdToAssets>'
/app/db/migrate/20131022082744_add_project_id_to_assets.rb:1:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:718:in `load_migration'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:714:in `migration'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:708:in `disable_ddl_transaction'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:1012:in `use_transaction?'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:922:in `rescue in block in migrate'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:919:in `block in migrate'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:916:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:916:in `migrate'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:764:in `up'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:742:in `migrate'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
 create_table "assets", force: true do |t|
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "photo_file_name"
    t.string   "photo_content_type"
    t.integer  "photo_file_size"
    t.datetime "photo_updated_at"
    t.integer  "project_id"
    t.string   "video_file_name"
    t.string   "video_content_type"
    t.integer  "video_file_size"
    t.datetime "video_updated_at"
  end
add_index "projects", ["permalink"], name: "index_projects_on_permalink", using: :btree

  create_table "settings", force: true do |t|
    t.string   "title"
    t.text     "description"
    t.text     "paragraph"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "photo_file_name"
    t.string   "photo_content_type"
    t.integer  "photo_file_size"
    t.datetime "photo_updated_at"
    t.string   "video_file_name"
    t.string   "video_content_type"
    t.integer  "video_file_size"
    t.datetime "video_updated_at"
  end

我很乐意需要帮助!:)

您的迁移告诉我表中已经有了该列。关于你的上传不工作。你在使用像s3这样的外部服务吗?@DickieBoy还没有,只是在使用heroku。我知道这不推荐,但我希望它首先只与Heroku一起使用,这样我就可以展示它,然后查看不同的云存储。请发布迁移。问题是Heroku上没有安装ffmpeg。