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.

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.