2013-12-07 36 views
0

我不知道發生了什麼變化嘗試登錄時收到此錯誤:軌道4的關係問題,在登錄

ERROR: relation "tags" does not exist 
LINE 1: SELECT DISTINCT "tags".* FROM "tags" INNER JOIN "taggings" O... 

標籤型號:

class Tag < ActiveRecord::Base 
    attr_accessor :unread_count, :user_feeds 

    has_many :taggings 
    has_many :feeds, through: :taggings 
end 

的標籤模型:

class Tagging < ActiveRecord::Base 
    belongs_to :tag 
    belongs_to :feed 
    belongs_to :user 
end 

和用戶的關係:

class User < ActiveRecord::Base 
    has_one :coupon 
    has_many :subscriptions, dependent: :delete_all 
    has_many :feeds, through: :subscriptions 
    has_many :entries, through: :feeds 
    has_many :imports, dependent: :destroy 
    has_many :billing_events, as: :billable, dependent: :delete_all 
    has_many :taggings, dependent: :delete_all 
    has_many :tags, through: :taggings 
    has_many :sharing_services, dependent: :delete_all 
    has_many :unread_entries, dependent: :delete_all 
    has_many :starred_entries, dependent: :delete_all 
    has_many :saved_searches, dependent: :delete_all 
    has_many :actions, dependent: :destroy 
    belongs_to :plan 
end 

這個錯誤是新的,並且在我嘗試安裝intercom.io gem後出現。我刪除了寶石,做了一個寶石清理,重置數據庫和仍然是相同的錯誤。

不知道發生了什麼,如果有人有任何建議,我將不勝感激。

+0

嘗試通過'rake db:migrate'運行你的遷移。 – janfoeh

+0

哇,由於某種原因,標籤表不存在。遷移都搞砸了。 – tmartin314

回答

0

檢查缺少的表,這就是問題所在。