我在我的项目中使用过rails 4和
postgresql 9.4.当我运行“rdd&& rdc&& rdm&& rds”时我得到了这个错误PG :: UndefinedObject:ERROR:输入“jsonb”不存在怎么解决这个错误?告诉我.
我的迁移文件:
class CreateConsultingLocationDoctorSchedules < ActiveRecord::Migration def change create_table :consulting_location_doctor_schedules do |t| t.belongs_to :consulting_location_doctor t.datetime :schedule_date,null: false t.jsonb :slot_details,index: true,default: {} t.daterange :start_and_end_time,null: false t.datetime :deleted_at t.belongs_to :deleted_by t.timestamps end end end
谢谢你的帮助!
检查您是否已连接到正在开发的Postgres实例.
rails console ActiveRecord::Base.connection.execute("select version();").first["version"]
如果您确定运行的是9.4,那么可能是您运行了两台Postgres服务器.一个9.4,一个较旧的.
我遇到了这个问题并编辑了我的database.yml和指定的主机:’localhost’.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。