Rails 4.2 MySQL 5.6 Elastic Beanstalk YAML 语法错误
Rails 4.2 MySQL 5.6 Elastic Beanstalk YAML Syntax Error
所以我正在尝试将 ruby on rails 应用程序部署到 Amazon AWS Elastic Beanstalk。终端中没有错误,但应用程序不会部署。当我检查日志时,显示了两个错误
Activity execution failed, because: command failed with error code 1: /opt/elasticbeanstalk/hooks/appdeploy/pre/12_db_migration.sh
在下面...
YAML syntax error occurred while parsing /var/app/ondeck/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): did not find expected key while parsing a block mapping at line 21 column 3
Psych::SyntaxError: (<unknown>): did not find expected key while parsing a block mapping at line 21 column 3
Tasks: TOP => db:migrate => db:load_config
我已经一遍又一遍地检查我的 database.yml 文件是否有错误,但在这里什么也看不到
development:
adapter: mysql2
encoding: utf8
pool: 5
username: sean
password: "mypass"
socket: /var/run/mysqld/mysqld.sock
database: reviewchipWebsite_development
test:
adapter: mysql2
encoding: utf8
pool: 5
username: sean
password: "mypass"
socket: /var/run/mysqld/mysqld.sock
database: reviewchipWebsite_test
production:
adapter: mysql2
encoding: utf8
database: ebdb
username: seanAndrew
password: "mypass"
host: aa1bszpu5vavup2.cvln1rz36k57.us-west-2.rds.amazonaws.com
port: 3306
socket: /var/lib/mysql/mysql.sock
YAML 非常挑剔,您可能会有一些非打印字符(例如额外的换行符)。尝试将您的 database.yml 复制粘贴到此处 yamllint.com,它会清理它。
所以我正在尝试将 ruby on rails 应用程序部署到 Amazon AWS Elastic Beanstalk。终端中没有错误,但应用程序不会部署。当我检查日志时,显示了两个错误
Activity execution failed, because: command failed with error code 1: /opt/elasticbeanstalk/hooks/appdeploy/pre/12_db_migration.sh
在下面...
YAML syntax error occurred while parsing /var/app/ondeck/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): did not find expected key while parsing a block mapping at line 21 column 3
Psych::SyntaxError: (<unknown>): did not find expected key while parsing a block mapping at line 21 column 3
Tasks: TOP => db:migrate => db:load_config
我已经一遍又一遍地检查我的 database.yml 文件是否有错误,但在这里什么也看不到
development:
adapter: mysql2
encoding: utf8
pool: 5
username: sean
password: "mypass"
socket: /var/run/mysqld/mysqld.sock
database: reviewchipWebsite_development
test:
adapter: mysql2
encoding: utf8
pool: 5
username: sean
password: "mypass"
socket: /var/run/mysqld/mysqld.sock
database: reviewchipWebsite_test
production:
adapter: mysql2
encoding: utf8
database: ebdb
username: seanAndrew
password: "mypass"
host: aa1bszpu5vavup2.cvln1rz36k57.us-west-2.rds.amazonaws.com
port: 3306
socket: /var/lib/mysql/mysql.sock
YAML 非常挑剔,您可能会有一些非打印字符(例如额外的换行符)。尝试将您的 database.yml 复制粘贴到此处 yamllint.com,它会清理它。