Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

George Petrov
George Petrov
9,663 Points

Precompiling assets failed, enabling runtime...

Dear Treehouse, I've completed the 2nd Ruby on Rails badge (advanced social features) and everything is working perfectly locally. The issues comes when I git push heroku master, I get the following errors:

All the bundles...

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?

some failing code here...

Precompiling assets failed, enabling runtime asset compilation Injecting rails31_enable_runtime_asset_compilation

The website is running on heroku, however I feel like I should do something about it. I tried configuring the application.rb to: config.assets.initialize_on_precompile = false however it is rejected due to Devise.

Any help would be appreciated. Thank you.

1 Answer

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey George Petrov that's a really weird error! Try following along here https://devcenter.heroku.com/articles/rails-asset-pipeline and see if that helps. There's an option to precompile the assets locally before pushing up to Heroku that might work for you.