我无法推送到heroku。
这是我的heroku日志http://pastebin.com/M7q7qJ3x
错误发生在这里
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
这是我的 database.yml 文件
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: postgresql
encoding: unicode
database: restaurant_development
pool: 5
username: judyngai
password:
host: localhost
# 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: postgresql
encoding: unicode
database: restaurant_test
pool: 5
username: judyngai
password:
host: localhost
production:
adapter: postgresql
encoding: unicode
database: restaurant_production
pool: 5
username: judyngai
password:
host: localhost
我应该将主机更改为“127.0.0.1”并添加一个端口吗?这很奇怪。我不明白这一点。
这是另一个错误
Precompiling assets failed, enabling runtime asset compilation
我根本没有碰过 js、css 文件。
我应该在推送之前在本地“编译资产”吗?我对资产不太熟悉。