我正在尝试第一次部署项目,我不知道如何处理此错误。 这是输出:
anna@anna-X550LA:~/jobfy$ git push heroku master
Counting objects: 479, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (299/299), done.
Writing objects: 100% (479/479), 1.04 MiB | 0 bytes/s, done.
Total 479 (delta 269), reused 312 (delta 157)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote: - php (7.0.4)
remote: - apache (2.4.18)
remote: - nginx (1.8.1)
remote:
remote: ! WARNING: Your 'composer.lock' is not up to date with the latest
remote: changes in 'composer.json'. To ensure you are not getting stale
remote: dependencies, run 'composer update' on your machine and commit
remote: any changes to Git before pushing again.
remote:
remote: -----> Installing dependencies...
remote: Composer version 1.0.0-beta1 2016-03-03 15:15:10
remote: Loading composer repositories with package information
remote: Installing dependencies from lock file
remote: - Installing doctrine/lexer (v1.0.1)
remote: Downloading: 100%
remote:
remote: - Installing doctrine/annotations (v1.2.7)
remote: Downloading: 100%
remote:
remote: - Installing twig/twig (v1.24.0)
remote: Downloading: 100%
remote:
remote: - Installing symfony/symfony (v2.8.3)
remote: Downloading: 100%
remote:
remote: - Installing symfony/security-acl (v2.8.0)
remote: Downloading: 100%
remote:
remote: - Installing symfony/polyfill-util (v1.1.1)
remote: Downloading: 100%
remote:
remote: - Installing paragonie/random_compat (v1.2.2)
remote: Downloading: 100%
remote:
remote: - Installing symfony/polyfill-php70 (v1.1.1)
remote: Downloading: 100%
remote:
remote: - Installing symfony/polyfill-php56 (v1.1.1)
remote: Downloading: 100%
remote:
remote: - Installing ircmaxell/password-compat (v1.0.4)
remote: Downloading: 100%
remote:
remote: - Installing symfony/polyfill-php55 (v1.1.1)
remote: Downloading: 100%
remote:
remote: - Installing symfony/polyfill-php54 (v1.1.1)
remote: Downloading: 100%
remote:
remote: - Installing symfony/polyfill-mbstring (v1.1.1)
remote: Downloading: 100%
remote:
remote: - Installing symfony/polyfill-intl-icu (v1.1.1)
remote: Downloading: 100%
remote:
remote: - Installing symfony/polyfill-apcu (v1.1.1)
remote: Downloading: 100%
remote:
remote: - Installing psr/log (1.0.0)
remote: Downloading: 100%
remote:
remote: - Installing doctrine/inflector (v1.1.0)
remote: Downloading: 100%
remote:
remote: - Installing doctrine/collections (v1.3.0)
remote: Downloading: 100%
remote:
remote: - Installing doctrine/cache (v1.5.4)
remote: Downloading: 100%
remote:
remote: - Installing doctrine/common (v2.5.3)
remote: Downloading: 100%
remote:
remote: - Installing jdorn/sql-formatter (v1.2.17)
remote: Downloading: 100%
remote:
remote: - Installing doctrine/doctrine-cache-bundle (1.3.0)
remote: Downloading: 100%
remote:
remote: - Installing doctrine/dbal (v2.5.4)
remote: Downloading: 100%
remote:
remote: - Installing doctrine/doctrine-bundle (1.6.2)
remote: Downloading: 100%
remote:
remote: - Installing doctrine/orm (v2.4.8)
remote: Downloading: 100%
remote:
remote: - Installing friendsofsymfony/user-bundle (dev-master 16b04c4)
remote: Downloading: 100%
remote:
remote: - Installing incenteev/composer-parameter-handler (v2.1.2)
remote: Downloading: 100%
remote:
remote: - Installing sensiolabs/security-checker (v3.0.2)
remote: Downloading: 100%
remote:
remote: - Installing sensio/distribution-bundle (v5.0.5)
remote: Downloading: 100%
remote:
remote: - Installing sensio/framework-extra-bundle (v3.0.14)
remote: Downloading: 100%
remote:
remote: - Installing monolog/monolog (1.18.1)
remote: Downloading: 100%
remote:
remote: - Installing symfony/monolog-bundle (v2.10.0)
remote: Downloading: 100%
remote:
remote: - Installing swiftmailer/swiftmailer (v5.4.1)
remote: Downloading: 100%
remote:
remote: - Installing symfony/swiftmailer-bundle (v2.3.11)
remote: Downloading: 100%
remote:
remote: Generating optimized autoload files
remote: > Incenteev\ParameterHandler\ScriptHandler::buildParameters
remote: Creating the "app/config/parameters.yml" file
remote: > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
remote: > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
remote:
remote:
remote: [Doctrine\DBAL\Exception\ConnectionException]
remote: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused
remote:
remote:
remote:
remote: [Doctrine\DBAL\Driver\PDOException]
remote: SQLSTATE[HY000] [2002] Connection refused
remote:
remote:
remote:
remote: [PDOException]
remote: SQLSTATE[HY000] [2002] Connection refused
remote:
remote:
remote: Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception
remote:
remote:
remote: [RuntimeException]
remote: An error occurred when executing the "'cache:clear --no-warmup'" command:
remote:
remote: [Doctrine\DBAL\Exception\ConnectionException]
remote: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused
remote:
remote:
remote: [Doctrine\DBAL\Driver\PDOException]
remote: SQLSTATE[HY000] [2002] Connection refused
remote:
remote:
remote: [PDOException]
remote: SQLSTATE[HY000] [2002] Connection refused
remote:
remote: .
remote:
remote:
remote: install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
remote:
remote:
remote: ! Push rejected, failed to compile PHP app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to pacific-tor-55653.
remote:
To https://git.heroku.com/pacific-tor-55653.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/pacific-tor-55653.git'
是config.yml文件:
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }
- { resource: "@JobFyBundle/Resources/config/services.yml" }
# Put parameters here that don't need to change on each machine where the app is deployed
#
http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
locale: en
framework:
#esi: ~
#translator: { fallbacks: ["%locale%"] }
secret: "%secret%"
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
#serializer: { enable_annotations: true }
templating:
engines: ['twig']
default_locale: "%locale%"
trusted_hosts: ~
trusted_proxies: ~
session:
# handler_id set to null will use default session handler from php.ini
handler_id: ~
fragments: ~
http_method_override: true
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
# Doctrine Configuration
doctrine:
dbal:
driver: pdo_pgsql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
# path: "%database_path%"
orm:
auto_generate_proxy_classes: "%kernel.debug%"
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
fos_user:
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
user_class: JobFyBundle\Entity\User
我使用Ubuntu 14.04,Symfony2.8,Php 5.6 我不确定你还需要什么,所以如果有问题我会添加它。 谢谢你的帮助!