1

我正在尝试将本地数据库上传到生产环境,但在处理过程中一直遇到以下错误:

$ heroku pg:transfer --from postgres://username:password@localhost/blog_develo
pment --to olive --confirm appname
Source database: blog_development on localhost:5432
Target database: HEROKU_POSTGRESQL_OLIVE_URL on afternoon-taiga-2766.herokuapp.com
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading extensions
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined operator families
pg_dump: reading user-defined text search parsers
pg_dump: reading user-defined text search templates
pg_dump: reading user-defined text search dictionaries
pg_dump: reading user-defined text search configurations
pg_dump: reading user-defined foreign-data wrappers
pg_dump: reading user-defined foreign servers
pg_dump: reading default privileges
pg_dump: reading user-defined collations
pg_dump: reading user-defined conversions
pg_dump: reading type casts
pg_dump: reading table inheritance information
pg_dump: reading rewrite rules
pg_dump: finding extension members
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump: finding the columns and types of table "schema_migrations"
pg_dump: finding the columns and types of table "articles"
pg_dump: finding default expressions of table "articles"
pg_dump: flagging inherited columns in subtables
pg_dump: reading indexes
pg_dump: reading indexes for table "schema_migrations"
pg_dump: reading indexes for table "articles"
pg_dump: reading constraints
pg_dump: reading triggers
pg_dump: reading large objects
pg_dump: reading dependency data
pg_dump: saving encoding = WIN1252
pg_dump: saving standard_conforming_strings = on
pg_dump: saving database definition
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position -- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position -- ftell used
pg_dump: dumping contents of table articles
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position -- ftell used
pg_dump: dumping contents of table schema_migrations
pg_restore: [archiver] did not find magic string in file header

这是我刚刚创建的一个非常简单的应用程序,用于练习使用 postgresql 数据库(它只有两个表、文章和迁移)。有没有人见过这个错误。我正在尝试使用 pg:transfer 上传到数据库。谢谢您的帮助。

编辑

数据库.yml

development:
   adapter: postgresql
   encoding: unicode
   database: blog_development
   pool: 5
   username: benjaminw
   password:

test:
   adapter: postgresql
   encoding: unicode
   database: blog_test
   pool: 5
   username: benjaminw
   password:

production:
   adapter: postgresql
   encoding: unicode
   database: blog_production
   pool: 5
   username: blog
   password:

这是 Gemfile。

source 'https://rubygems.org'

gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'pg'
#gem 'activerecord-postgresql-adapter'
#gem 'sequel'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
   gem 'sass-rails',   '~> 3.2.3'
   gem 'coffee-rails', '~> 3.2.1'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
4

0 回答 0