documentcloud / cloud-crowd

Parallel Processing for the Rest of Us

Home Page:https://github.com/documentcloud/cloud-crowd/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crowd doesn't work on Rails

lucascs opened this issue · comments

Hi there,

I tried to use crowd with a legacy rails application, in order to parallelize some tasks.
I followed the doc:
http://wiki.github.com/documentcloud/cloud-crowd/cloudcrowd-on-rails

I put the configuration mentioned in this doc in config.ru and started my applications server and the crowd's server and node, but crowd seems to use my app's configuration for the database...

In my app's database.yml, i have:

development:
database: myapp_development

and in crowd's database.yml:

:database: cloud_crowd

I've already ran "crowd load_schema", but crowd dies with:
Table myapp_development.jobs doesn't exist

If I try to use the same database for both crowd and my app, crowd dies with:
ArgumentError - CloudCrowd is not missing constant Job!:

I think that Rails ActiveRecord's configuration is messing up Crowd config...

Is there any other way to use my app's model along with crowd actions?

Thanks
Lucas

Instead of putting it in config.ru, try placing the Rails configuration in your action itself, or in a setup.rb file that your actions require. Let me know if that doesn't work for you.

It worked, thanks =)