Sto seguendo Play 2.0 tutorial per ScalaGioca 2.0 scala esercitazione - Heroku non riuscendo a causa dell'evoluzione
Tutto funziona bene fino a quando provo a spingere ed eseguirlo sul Heroku. dopo aver eseguito "git push heroku master", il server si blocca. Controllando i registri, vedo quanto segue:
Starting process with command `target/start -Dhttp.port=37849 -Xmx384m -Xss512k -XX:+UseCompressedOops`
2012-08-13T06:52:45+00:00 app[web.1]: Play server process ID is 2
2012-08-13T06:52:46+00:00 app[web.1]: [info] play - database [default] connected at jdbc:h2:mem:play
2012-08-13T06:52:46+00:00 app[web.1]: [warn] play - Your production database [default] needs evolutions!
2012-08-13T06:52:46+00:00 app[web.1]:
2012-08-13T06:52:46+00:00 app[web.1]: CREATE SEQUENCE task_id_seq;
2012-08-13T06:52:46+00:00 app[web.1]: label varchar(255)
2012-08-13T06:52:46+00:00 app[web.1]: CREATE TABLE task (
2012-08-13T06:52:46+00:00 app[web.1]: id integer NOT NULL DEFAULT nextval('task_id_seq'),
2012-08-13T06:52:46+00:00 app[web.1]:);
2012-08-13T06:52:46+00:00 app[web.1]:
2012-08-13T06:52:46+00:00 app[web.1]: # --- Rev:1,Ups - c5e3eee
2012-08-13T06:52:46+00:00 app[web.1]: [warn] play - Run with -DapplyEvolutions.default=true if you want to run them automatically (be careful)
2012-08-13T06:52:46+00:00 app[web.1]: Oops, cannot start the server.
2012-08-13T06:52:46+00:00 app[web.1]: PlayException: Database 'default' needs evolution! [An SQL script need to be run on your database.]
2012-08-13T06:52:46+00:00 app[web.1]: at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:422)
Qualche idea?
Ho avuto le dipendenze per PostgreSQL nel mio file Build.scala e specificato nel mio Procfile. Tuttavia, ho scoperto il problema - Ho avuto un errore di battitura nel mio Procfile e non si caricava correttamente. Sicuramente un errore da principiante! – user1594608
il problema è causato da uno script di evoluzione che deve essere eseguito. L'impostazione dello script di evoluzione da eseguire risolve automaticamente questo. –