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 9034235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:25:34+00:00 2026-06-16T08:25:34+00:00

I have a Rails 3 app deployed on Appfog with a postgresql database. I

  • 0

I have a Rails 3 app deployed on Appfog with a postgresql database. I would like to run background jobs with IronWorker but i can not connect to my database.

Here are my ironworker files (.worker + my_worker.rb)

.worker

runtime "ruby"
gemfile '../Gemfile'
dir "../app/models" # merge all models
full_remote_build true
exec "my_worker.rb"

my_worker.rb

require 'rubygems'
require 'active_record'
require 'pg'
require 'models/my_model.rb'


def setup_database
  puts "Database connection details:#{params['database'].inspect}"
  return unless params['database']
  # estabilsh database connection
  ActiveRecord::Base.establish_connection(params['database'])
end


setup_database
@my_models = My_model.all

Then i create a task, with passing the database connection to ironworker:

client = IronWorkerNG::Client.new
client.tasks.create("my_worker", database:Rails.configuration.database_configuration[Rails.env])

And here is the error i have in IronWorker

/task/__gems__/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1213:in `initialize': could not connect to server: Connection timed out (PG::Error)
Is the server running on host "10.0.48.220" and accepting TCP/IP connections on port 5432?

Can somebody help me out to connect my Appfog DB from IronWorker ?

Thanks a lot in advance

—
Mathieu

  • 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-06-16T08:25:34+00:00Added an answer on June 16, 2026 at 8:25 am

    As far as i know, AppFog blocking external connections to their databases
    https://groups.google.com/forum/?fromgroups=#!topic/appfog-users/I31ni0pff9I

    Possible solutions:

    • Poke AppFog
    • Switch to other database hoster
    • Make some kind of tunnel.
      As example, IronWorker platform allows you to interact with any non-privileged code during worker’s execution, so you can try to set up SSH tunnel to ‘good’ machine.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Rails app deployed to Heroku, I can reach it from the
Have a working rails app on development but issue deployed. Was recently working but
I have a Rails app deployed on Heroku with the Heroku scheduler add-on successfully
I have a Ruby on Rails app that I've recently deployed to a remote
I have rails app which are working perfectly in the local computer. But when
I have a rails app, where Im having a drop box like feature-set. Each
Let's say I have deployed my Rails app on a VPS, and everything works
I deployed a Ruby on Rails app to Heroku, and I realized they have
Is it feasible to have a Ruby on Rails app, which is: a) deployed
This is probably something stupid as I have never deployed a Rails app before.

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.