Using postgres.
Haven't been able to push.
Tried this without any luck:
config.assets.initialize_on_precompile = false
-----> 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?
The accepted answer did not fully resolve this. I tried to find a solution for 2-3 hours without success, then this worked:
In your app directory.
heroku labs:enable user-env-compile
it is still failing?
heroku labs:disable user-env-compile
heroku labs:enable user-env-compile
Then it worked for me, just had to remove and do again.
The following config is no longer needed in Rails 4. Compiling assets must work without it.
config.assets.initialize_on_precompile = false
config.assets.initialize_on_precompile = false
Include that in application.rb, ABOVE module APPNAME
I had originally included it inside
class Application < Rails::Application
Edit: actually, the above didn't fix it.
I had to do this
https://devcenter.heroku.com/articles/labs-user-env-compile
Try executing locally
bundle exec rake assets:precompile RAILS_ENV=production
It might be because of devise gem as in my case. You might be missing secret key in devise initializer. try adding
config.secret_key = "PROVIDE-KEY"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With