Cannot run rake db:migrate, relation does not exist

前端 未结 2 535
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-14 09:53

I am trying to get a working app to work on linux 10.04 running on vagrant

I installed all relevant gems, installed postgresql 9.1.9 and when I am trying to run

2条回答
  •  温柔的废话
    2021-01-14 10:42

    The Routes file in Rails uses device_for, which loads the User model, which in turn has acts_as_messagable and loads the Message class. Line #29 in Message class says:

    scope :unread, where('reciever_open = false')

    The where method is triggering a column lookup, which fails because the migrations haven't run yet! Try one of these two:

    Change this to:

    scope :unread, where(:reciever_open => false)

    Or if that also triggers a column lookup, then say:

    scope :unread, lambda { where('reciever_open = false') }

提交回复
热议问题