Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby heroku pg:上传postgresql数据库时发生传输-接收错误_Ruby_Database_Ruby On Rails 3_Heroku_Rails Postgresql - Fatal编程技术网

Ruby heroku pg:上传postgresql数据库时发生传输-接收错误

Ruby heroku pg:上传postgresql数据库时发生传输-接收错误,ruby,database,ruby-on-rails-3,heroku,rails-postgresql,Ruby,Database,Ruby On Rails 3,Heroku,Rails Postgresql,我正在尝试将本地数据库上载到生产系统,在处理过程中不断遇到以下错误: $ 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 a

我正在尝试将本地数据库上载到生产系统,在处理过程中不断遇到以下错误:

$ 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上传到数据库。谢谢你的帮助

编辑

Database.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:
这是档案

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'

你能把你的database.yml和gemfile贴在这里吗好的,我添加了gemfile和database.yml