開発中は正常に動作しているアプリがありますが、それを heroku にプッシュして "heroku run rake db:migrate" を実行しようとすると、rake は次のメッセージで中止されました。
rake aborted!
PG::Error: ERROR: relation "submissions" does not exist
LINE 4: WHERE a.attrelid = '"submissions"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"submissions"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
これをテストする場所がわかりません。スキーマに問題が見つかりません。rake db:setup も機能しません。ここに私のスキーマがあります:
ActiveRecord::Schema.define(:version => 20120913202908) do
create_table "active_admin_comments", :force => true do |t|
t.string "resource_id", :null => false
t.string "resource_type", :null => false
t.integer "author_id"
t.string "author_type"
t.text "body"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "namespace"
end
add_index "active_admin_comments", ["author_type", "author_id"], :name => "index_active_admin_comments_on_author_type_and_author_id"
add_index "active_admin_comments", ["namespace"], :name => "index_active_admin_comments_on_namespace"
add_index "active_admin_comments", ["resource_type", "resource_id"], :name => "index_admin_notes_on_resource_type_and_resource_id"
create_table "admin_users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "admin_users", ["email"], :name => "index_admin_users_on_email", :unique => true
add_index "admin_users", ["reset_password_token"], :name => "index_admin_users_on_reset_password_token", :unique => true
create_table "categories", :force => true do |t|
t.string "name"
t.text "description"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "festival_id"
end
create_table "categories_users", :id => false, :force => true do |t|
t.integer "category_id", :null => false
t.integer "user_id", :null => false
end
create_table "festivals", :force => true do |t|
t.date "opening_date"
t.date "closing_date"
t.string "title"
t.string "slogan"
t.string "tag"
t.datetime "submission_start_date"
t.datetime "submission_end_date"
t.boolean "published"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "links", :force => true do |t|
t.string "name"
t.string "url"
t.string "kind"
t.integer "submission_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "performers", :force => true do |t|
t.string "name"
t.string "email"
t.integer "submission_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "submissions", :force => true do |t|
t.string "show_title"
t.string "group_name"
t.string "home_city"
t.string "home_theater"
t.string "country"
t.text "promotional_description"
t.text "additional_information"
t.string "contact_name"
t.string "contact_phone"
t.string "contact_email"
t.boolean "glbt_showcase"
t.boolean "diversity_showcase"
t.integer "user_id"
t.integer "category_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "name"
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.string "unconfirmed_email"
t.boolean "curator"
end
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
create_table "venues", :force => true do |t|
t.string "name"
t.string "address1"
t.string "address2"
t.string "city"
t.string "state"
t.string "zip"
t.string "box_office_number"
t.string "website"
t.string "stage_name"
t.text "description"
t.string "contact_name"
t.string "contact_phone_number"
t.string "contact_email"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
end
どこで問題を探すべきかについての提案はありますか? 何を探すべきですか?
私は似たような問題を数多く見てきましたが、何を探すべきか明確な答えはないようです。
更新: ActiveAdmin の初期化子は次のとおりです。
ActiveAdmin.setup do |config|
config.site_title = "Cif4"
config.authentication_method = :authenticate_admin_user!
config.current_user_method = :current_admin_user
config.logout_link_path = :destroy_admin_user_session_path
config.batch_actions = true
end