Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 363 Vote(s) - 3.55 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Heroku Rails 4 could not connect to server: connection refused

#1
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?
Reply

#2
If you're using Rolify pre version 3.5 then it might be that:

[To see links please register here]

Reply

#3
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"
Reply

#4
The heroku dev center talks about troubleshooting this. Basically your rails4 app should not rely on having config vars present during runtime.

[

[To see links please register here]

Reply

#5
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
Reply

#6
`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

[

[To see links please register here]

][1]


[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through