从 heroku 移动到 dokku / 数字海洋,我使用 pg_dump 将数据库复制到一个文件“latest.dump”中,并使用 pg_restore 到我的本地 pg db 并且它正常工作。但是,当我尝试运行 dokku postegresql:restore 命令时,它会运行并且我收到“数据库已恢复”但有很多错误并且实际上没有任何数据被恢复。有关如何排除故障/导致错误的原因的任何建议?
root@domain:~# dokku postgresql:restore db_name < dokku/db/latest.dump
ERROR: syntax error at or near "PGDMP"
LINE 1: PGDMP
id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error …Run Code Online (Sandbox Code Playgroud) 我正在尝试将表单添加到模式,然后通过JS格式提交表单,remote: true但表单似乎是以HTML格式提交,导致未知的格式问题.任何帮助,将不胜感激.
Started POST "/create_deliv_extra" for 127.0.0.1 at 2014-06-16 20:38:17 -0400
Processing by DeliveriesController#create_deliv_extra as HTML
Completed 406 Not Acceptable in 21ms
ActionController::UnknownFormat
Run Code Online (Sandbox Code Playgroud)
形成:
</br>
<%= form_tag create_deliv_extra_url, remote: true, class:"form-inline mb10 mt5", id:"extra_f_#{order.id}" do %>
<%= text_field_tag :description, @extra.description, placeholder: "Description", "data-provide"=>"typeahead", autocomplete: :off, "data-source"=>"#{Extra.all.pluck(:description).uniq}", class:"span4" %>
<% if order.cod == true || current_user.role == "Billing" || current_user.role == "admin" || current_user.role == "Exec" %>
<div class="input-prepend">
<span class="add-on">Amount $</span>
<%= text_field_tag :amount, @extra.amount, placeholder: "$000.00", class:"input-xs" …Run Code Online (Sandbox Code Playgroud)