I had huge issues with starting sidekiq on Heroku after updating my gems and putting everything into production. The problem was that Sidekiq tried to connect to Redis on a local connection and port, instead of using the REDISTOGO variable. After spending a few hours, I managed to fix it: Answer below.
相关问题
- Getting Redis Master address from Sentinel C#
- How to specify memcache server to Rack::Session::M
- Connecting Python to a Heroku PostgreSQL DB?
- rails/heroku migrating from gem to toolbelt
- Configuring Redis to play nice with AppHarbor
Not an answer - but want to add to the SEO for this post so others can find this. This is also the answer to an issue where heroku will throw the error:
This issue has been unanswered on many SO questions (example), and everyone says the database isn't correctly configured, which is not necessarily the case.
I tried for hourrrrsss to figure out the issue, and this was the solution! Thank you so much - I wish I could upvote your answers more than once!!
Remove everything from the if and below and run this:
Sidekiq will automatically use it.
I looked up the correct, new connection that RedisToGo provides and then inserted it into the variables. Some posts here on SO claimed that this wasn't necessary, but it seems it is.
My sidekiq.rb file in the initializers now looks like this, everything works.