[Backgroundrb-devel] Setting Product Env

Jonathan Métillon jmetillon at gmail.com
Wed Sep 6 04:07:41 EDT 2006


Maybe you are using version control and when you deploy to your server, you
don't update your newly checked out version so it uses production. That's
what happened to me. For example in my deploy recipe I have:

run "cat #{release_path}/config/backgroundrb.yml | sed
's#development#production#g' > #{release_path}/config/backgroundrb.yml"

Just before the BackgrounDRb restart:

sudo "#{release_path}/script/backgroundrb/restart"

On 9/6/06, Chris Bruce <cbruce at sleeter.com> wrote:
> When I am using my rails models in my worker class, it appears the
> background worker class is always using development no matter what I do.
> I set background.yml to production.  I even have ENV['RAILS_ENV'] ||=
> 'production uncommented in environment.rb.  I don't have the development
> db even created on my production box, so not sure where it is getting
> development from.  I am using fastcgi and have the environment correctly
> specified in my fastcgi config.
> Any ideas?
> Thanks,
> Chris
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060906/f19603a9/attachment.html 

More information about the Backgroundrb-devel mailing list