4

I am having trouble pushing to heroku.

Here is my heroku log http://pastebin.com/M7q7qJ3x

The error occurred around here

-----> 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?

and here is my database.yml file

# 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

should I change the host to "127.0.0.1" and add in a port ? This is odd. I don't understand this.

and here is another error

Precompiling assets failed, enabling runtime asset compilation

I did not touch the js,css files at all.

Should I be "compiling assets" locally before I push? I am not quite familiar with assets.

2 Answers 2

4

In your config in application.rb or production.rb add

config.assets.initialize_on_precompile = true
0

Gemfile

Add this

gem 'sass', '3.2.13'

its work for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.