Ignoring Heroku Push Precpiling Port Error Errors

I'm having trouble clicking on a hero.

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

An error has occurred 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 the port? This is strange. I do not understand this.

and here is another mistake

 Precompiling assets failed, enabling runtime asset compilation 

I did not touch js, css files at all.

Do I have to “compile assets” locally before clicking? I am not completely familiar with assets.

+4
source share
2 answers

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

 config.assets.initialize_on_precompile = true 
+4
source

Gemfile

Add this

 gem 'sass', '3.2.13' 

his work is for me.

0
source

Source: https://habr.com/ru/post/1497049/


All Articles