4

我无法推送到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 文件。

我应该在推送之前在本地“编译资产”吗?我对资产不太熟悉。

4

2 回答 2

4

在您的配置中application.rbproduction.rb添加

config.assets.initialize_on_precompile = true
于 2013-08-14T14:38:55.770 回答
0

宝石文件

添加这个

gem 'sass', '3.2.13'

它为我工作。

于 2014-06-22T02:35:48.947 回答