Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6107751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:13:20+00:00 2026-05-23T14:13:20+00:00

We built an api in rails and are hosting it on heroku and using

  • 0

We built an api in rails and are hosting it on heroku and using apn_sender to do the push notifications. We got everything running locally with apn_sender but when we push it to heroku and run

heroku rake apn:sender

we get the following error “Connection refused – Unable to connect to Redis on 127.0.0.1:6379”

We added the redistogo addon.

UPDATE

We added a resque.rb initializer:

require 'resque'

uri = URI.parse(ENV["REDISTOGO_URL"])
Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)

and called to start up the worker

heroku rake environment apn:sender

and everything seemed to work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:13:20+00:00Added an answer on May 23, 2026 at 2:13 pm

    Ok, so after further testing, the update I put in above doesn’t work for very long before it crashes. We then followed this http://blog.redistogo.com/2010/07/26/resque-with-redis-to-go/

    Changing

    task "resque:setup" => :environment do
      ENV['QUEUE'] = '*'
    end
    

    to

    task "apn:setup" => :environment do
      ENV['QUEUE'] = '*'
    end
    

    and

    desc "Alias for resque:work (To run workers on Heroku)"
    task "jobs:work" => "resque:work"
    

    to

    desc "Alias for apn:work (To run workers on Heroku)"
    task "jobs:work" => "apn:work"
    

    and it worked like a charm. Also note, that we had to add a worker dyno in heroku, which costs .05/hour or $35/month.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've written functional tests for API endpoints built in Rails using shoulda testing framework.
I'm using the Google Maps API to build a map full of markers, but
I have a fairly complex Rails app built on top of Twitter's API, and
I am using Authorize.net with Rails on Heroku. I have created a form to
I am build a real time web application using Ruby on Rails and Heroku
So I'm parsing data from twitter api in rails using the twitter library, and
I built a small cms for personal websites using Rails. Each site has a
I recently built an API and was often asked to replace the StringCollections I
is there something like API built atop the standard ProcessBuilder for calling system programs?
I have a project built and packaged with a specific version of jsp-apiand servlet-api

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.