2011-10-14 3 views
0

Ma base de données MySQL ne parvient pas à pousser vers la base de données Herokus postgreSQL. J'ai installé des robinets.Heroku n'a pas réussi à pousser la base de données: Taps Erreur du serveur: PGError: ERREUR:

Voici mon message d'erreur lorsque je tente de pousser ma base de données à Heroku:

[email protected] /c/rails/funanew (master) 
$ heroku db:push mysql://root:[email protected]/funew 
Loaded Taps v0.3.23 
Warning: Data in the app 'funa' will be overwritten and will not be recoverable. 

! WARNING: Potentially Destructive Action 
! This command will affect the app: funa 
! To proceed, type "funa" or re-run this command with --confirm funa 

> funa 
Sending schema 
Schema:  100% |==========================================| Time: 00:00:22 
Sending indexes 
Sending data 
4 tables, 26 records 
movielimits: 100% |==========================================| Time: 00:00:00 
photographers: 27% |===========        | ETA: 00:00:22 
Saving session to push_201110142326.dat.. 
!!! Caught Server Exception 
HTTP CODE: 500 
Taps Server Error: PGError: ERROR: invalid byte sequence for encoding "UTF8": 0 
xd872 
HINT: This error can also happen if the byte sequence does not match the encodi 
ng expected by the server, which is controlled by "client_encoding". 

["/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/postgres.r 
b:175:in `async_exec'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/seq 
uel/adapters/postgres.rb:175:in `block (2 levels) in execute'", "/app/.bundle/ge 
ms/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/database/logging.rb:28:in `log_yield 
'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/postgre 
s.rb:175:in `block in execute'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20. 
0/lib/sequel/adapters/postgres.rb:158:in `check_disconnect_errors'", "/app/.bund 
le/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `ex 
ecute'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/po 
stgres.rb:240:in `block (2 levels) in execute'", "/app/.bundle/gems/ruby/1.9.1/g 
ems/sequel-3.20.0/lib/sequel/connection_pool/threaded.rb:71:in `hold'", "/app/.b 
undle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:226:i 
n `synchronize'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/ad 
apters/postgres.rb:240:in `block in execute'", "/app/.bundle/gems/ruby/1.9.1/gem 
s/sequel-3.20.0/lib/sequel/adapters/postgres.rb:261:in `check_database_errors'", 
"/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/postgres.r 
b:238:in `execute'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel 
/database/query.rb:71:in `execute_dui'", "/app/.bundle/gems/ruby/1.9.1/gems/sequ 
el-3.20.0/lib/sequel/dataset/actions.rb:552:in `execute_dui'", "/app/.bundle/gem 
s/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:243:in `block (2 l 
evels) in import'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/ 
dataset/actions.rb:243:in `each'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.2 
0.0/lib/sequel/dataset/actions.rb:243:in `block in import'", "/app/.bundle/gems/ 
ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/database/query.rb:223:in `_transaction' 
", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/database/query.rb 
:209:in `block in transaction'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20. 
0/lib/sequel/connection_pool/threaded.rb:84:in `hold'", "/app/.bundle/gems/ruby/ 
1.9.1/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:226:in `synchronize'" 
, "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/database/query.rb: 
207:in `transaction'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequ 
el/dataset/actions.rb:243:in `import'", "/app/lib/taps/data_stream.rb:315:in `im 
port_rows'", "/app/lib/taps/data_stream.rb:158:in `fetch_remote_in_server'", "/a 
pp/lib/taps/server.rb:94:in `block (3 levels) in <class:Server>'", "/app/lib/tap 
s/utils.rb:161:in `call'", "/app/lib/taps/utils.rb:161:in `server_error_handling 
'", "/app/lib/taps/server.rb:92:in `block (2 levels) in <class:Server>'", "/app/ 
lib/taps/db_session.rb:15:in `block in conn'", "/app/.bundle/gems/ruby/1.9.1/gem 
s/sequel-3.20.0/lib/sequel/database/connecting.rb:76:in `connect'", "/app/.bundl 
e/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:119:in `connect'", "/app 
/lib/taps/db_session.rb:14:in `conn'", "/app/lib/taps/server.rb:91:in `block in 
<class:Server>'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/bas 
e.rb:865:in `call'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/ 
base.rb:865:in `block in route'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0 
/lib/sinatra/base.rb:521:in `instance_eval'", "/app/.bundle/gems/ruby/1.9.1/gems 
/sinatra-1.0/lib/sinatra/base.rb:521:in `route_eval'", "/app/.bundle/gems/ruby/1 
.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:500:in `block (2 levels) in route!'", 
"/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `catch 
'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `b 
lock in route!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/bas 
e.rb:476:in `each'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/ 
base.rb:476:in `route!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sin 
atra/base.rb:601:in `dispatch!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0 
/lib/sinatra/base.rb:411:in `block in call!'", "/app/.bundle/gems/ruby/1.9.1/gem 
s/sinatra-1.0/lib/sinatra/base.rb:566:in `instance_eval'", "/app/.bundle/gems/ru 
by/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `block in invoke'", "/app/. 
bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `catch'", "/a 
pp/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'" 
, "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `cal 
l!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:399:in 
`call'", "/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/auth/basic.rb:25 
:in `call'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb: 
979:in `block in call'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sina 
tra/base.rb:1005:in `synchronize'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1 
.0/lib/sinatra/base.rb:979:in `call'", "/home/heroku_rack/lib/static_assets.rb:9 
:in `call'", "/home/heroku_rack/lib/last_access.rb:15:in `call'", "/app/.bundle/ 
gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:47:in `block in call'", "/app 
/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in `each'", "/app 
/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in `call'", "/hom 
e/heroku_rack/lib/date_header.rb:14:in `call'", "/app/.bundle/gems/ruby/1.9.1/ge 
ms/rack-1.2.1/lib/rack/builder.rb:77:in `call'", "/app/.bundle/gems/ruby/1.9.1/g 
ems/thin-1.2.7/lib/thin/connection.rb:76:in `block in pre_process'", "/app/.bund 
le/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:74:in `catch'", "/app/ 
.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:74:in `pre_proces 
s'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:57:in 
`process'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb 
:42:in `receive_data'", "/app/.bundle/gems/ruby/1.9.1/gems/eventmachine-0.12.10/ 
lib/eventmachine.rb:256:in `run_machine'", "/app/.bundle/gems/ruby/1.9.1/gems/ev 
entmachine-0.12.10/lib/eventmachine.rb:256:in `run'", "/app/.bundle/gems/ruby/1. 
9.1/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in `start'", "/app/.bundle/gems 
/ruby/1.9.1/gems/thin-1.2.7/lib/thin/server.rb:156:in `start'", "/app/.bundle/ge 
ms/ruby/1.9.1/gems/thin-1.2.7/lib/thin/controllers/controller.rb:80:in `start'", 
"/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/runner.rb:177:in `run_co 
mmand'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/runner.rb:143:in 
`run!'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/bin/thin:6:in `<top (req 
uired)>'", "/usr/ruby1.9.2/bin/thin:19:in `load'", "/usr/ruby1.9.2/bin/thin:19:i 
n `<main>'"] 

[email protected] /c/rails/funanew (master) 
$ 

MISE À JOUR:

Quand je dis heroku db: pousser dans ma console git à la racine du app. Je reçois cette erreur:

[email protected] /c/rails/myapp (master) 
$ heroku db:push 
Loaded Taps v0.3.23 
Error parsing database.yml: undefined method `[]' for nil:NilClass 
c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.3.6/lib/heroku/command/db.rb:72:in 
`parse_database_yml' 
c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.3.6/lib/heroku/command/db.rb:157:in 
`parse_taps_opts' 
c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.3.6/lib/heroku/command/db.rb:29:in 
`push' 
c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.3.6/lib/heroku/command.rb:114:in `r 
un' 
c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.3.6/bin/heroku:14:in `<top (require 
d)>' 
c:/Ruby192/bin/heroku:19:in `load' 
c:/Ruby192/bin/heroku:19:in `<main>' 
Invalid database url 

[email protected] /c/rails/myapp (master) 
$ 

Mon database.yml dans le dossier config:

development: 
     adapter: mysql 
     database: [mydatabase] 
     encoding: utf8 
     pool: 5 
     username: root 
     password: mysecretpassword 
     socket: C:/xampp/mysql/bin/mysqld.sock 
     host: localhost 
     encoding: utf8 

    # Warning: The database defined as "test" will be erased and 
    # re-generated from your development database when you run "rake". 
    # Do not set this db to the same as development or production. 
    test: 
     adapter: mysql 
     database: [mydatabase] 
     pool: 5 
     username: root 
     password: mysecretpassword 
     socket: C:/xampp/mysql/bin/mysqld.sock 
     host: localhost 
     encoding: utf8 

    production: 
     adapter: mysql 
     database: [mydatabase] 
     pool: 5 
     username: root 
     password: mysecretpassword 
     socket: C:/xampp/mysql/bin/mysqld.sock 
     host: localhost 
     encoding: utf8 
+0

Votre base de données MySQL locale utilise-t-elle l'UTF-8? –

+0

Oui, il devrait l'utiliser. Le (Collation) pour la base de données est: utf8_danish_ci –

+0

J'ai mis à jour ma question avec un journal des erreurs lors de l'utilisation de heroku db: push au lieu de heroku db: push mysql: // monutilisateur: mypassword @ localhost/mydatabase –

Répondre

0

Le caractère 0xd872, je crois, n'est pas UTF-8. Quelque chose de similaire s'est produit here, also with Heroku.

Bonne chance.

[modifier] Oublié de mentionner, peut-être que votre éditeur n'a pas un caractère particulier dans son encodage ou sa police par défaut, et le remplace par le point d'interrogation en colère, en jetant l'erreur sur le téléchargement.

Questions connexes