Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Rohit Begani
5,614 PointsError on pushing to heroku
Hi,
Whenever I try to use push my app on heroku using the command:
git push heroku master
I get the following errors:
Bundle completed (25.92s)
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
Connecting to database specified by DATABASE_URL
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?
Tasks: TOP => environment
(See full trace by running task with --trace)
! ``` Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app```
What should I do? Please help
3 Answers

Jared Rader
Courses Plus Student 4,445 PointsTry putting this line:
config.assets.initialize_on_precompile = false
inside of config/application.rb.

Rohit Begani
5,614 Points@Jason Rader thanks. Its working now.

Jared Rader
Courses Plus Student 4,445 PointsI'm glad!