I've searched every solve for this problem for hours but I just can't get it to work.
I have a Rails app and I'm trying to deploy it to heroku, but when I run heroku run rake db:migrate
, I get this error:
rake aborted!
YAML syntax error occurred while parsing /app/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 7 column 3
I already used a YAML validator to validate my database.yml
, but it still does not work. Here is how it looks like:
# database.yml
---
default:
adapter: postgresql
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
development:
adapter: postgresql
database: chamada_development
encoding: unicode
password: "<%= ENV['CHAMADA_DATABASE_PASSWORD'] %>"
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: chamada
production:
adapter: postgresql
database: chamada_production
encoding: unicode
password: "<%= ENV['CHAMADA_DATABASE_PASSWORD'] %>"
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: chamada
test:
adapter: postgresql
database: chamada_test
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
How can I solve this? I have no clue.
I just solved it starting over the step by step to deploy the App in Heroku.