I followed the instructions on this post on how to setup BackgroundBRb:
http://www.hostingrails.com/forums/rails_coding_thread/1055
To setup the background tasks I ran:
# script/plugin install svn://rubyforge.org/var/svn/backgroundrb
# rake backgroundrb:setup
Next I edited the config/backgroundrb.yml to the following (I have hidden my port number and changed the exact class name)
port: "MY_PORT_NUMBER"
timer_sleep: 60
load_rails: true
environment: development
host: 127.0.0.1
database_yml: config/database.yml
acl:
deny: all
allow: localhost 127.0.0.1
order: deny,allow
autostart:
1:
job_key: job_name
class: class_name_worker
This works fine on my local machine, but when I deploy it to hostingrails and try to run the following command# rake backgroundrb:start
I get the following error
/usr/local/lib/ruby/1.8/drb/drb.rb:865:in `initialize': Cannot assign requested address - bind(2) (Errno::EADDRNOTAVAIL)
from /usr/local/lib/ruby/1.8/drb/drb.rb:865:in `open'
from /usr/local/lib/ruby/1.8/drb/drb.rb:865:in `open_server'
from /usr/local/lib/ruby/1.8/drb/drb.rb:759:in `open_server'
from /usr/local/lib/ruby/1.8/drb/drb.rb:757:in `each'
from /usr/local/lib/ruby/1.8/drb/drb.rb:757:in `open_server'
from /usr/local/lib/ruby/1.8/drb/drb.rb:1339:in `initialize'
from /usr/local/lib/ruby/1.8/drb/drb.rb:1627:in `new'
from /usr/local/lib/ruby/1.8/drb/drb.rb:1627:in `start_service'
... 21 levels...
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
from /home/myusername/rails/appname/script/backgroundrb/start:68
I am on the professional package and I do not have any Mongrel process running in my dedicated memory, so I was hoping to use it for this small background task.I found this similar post but I am still having the same problem
Drb ferret server deployment won´t start
http://www.hostingrails.com/forums/deployment_troubleshooting_thread/1357
Any help would be much appreciated