0

我正在与 Mattan Griffel 一起完成 One Month Rails 课程,但我遇到了 Imagemagik 问题(尝试上传带有 pin.rb 中应用样式的照片时出现以下错误 - xzy 图像无法被“识别”命令识别) ) 并在另一篇文章中看到,此问题与 Imagemagik 安装在我的本地计算机上有关,并且应用程序在部署到 Heroku 时应该可以工作(上传正确大小的引脚)。所以,我回去更新了我的 github 并将 master 推送到 Heroku。运行数据库迁移时,出现以下错误:

PG::Error: ERROR: relation "pins" does not exist : ALTER TABLE "pins" ADD COLUMN "user_id" integer

看起来引脚关系甚至不存在?在使用 Imagemagik 调试问题之前,我希望让应用程序在 Heroku 上运行。有什么想法吗?

Github - https://github.com/jrlundberg/omrails 应用程序 - http://still-scrubland-2791.herokuapp.com/

谢谢!

杰森。

4

1 回答 1

0

在您的迁移20130319034336中,您试图将一user_id列添加到pins不存在的表中。将迁移更改为:

class AddUserIdToPins < ActiveRecord::Migration
  def change
    create_table :pins do |t|
      t.integer :user_id
      t.timestamps
    end
    add_index :pins, :user_id
  end
end
于 2013-03-30T01:31:39.363 回答