Check out one of the cache money forks on GitHub. I believe one of
them has fixed this problem.
On Jun 10, 4:30 pm, davis
<dave.krupin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have been attempting to use cache-money on a new project and ran
> into a major problem. Normally it seems to be working as advertised
> but completely falls over when attempting to register a background
> task with BJ. Here is the error:
>
> NoMethodError (You have a nil object when you didn''t expect it!
> The error occurred while evaluating nil.repository):
> (__DELEGATION__):2:in `__send__''
> (__DELEGATION__):2:in `repository''
> /Library/Ruby/Gems/1.8/gems/nkallen-cache-money-0.2.5/lib/
> cache_money.rb:50:in `transaction''
> bj (1.0.1) lib/bj/table.rb:240:in `get''
> bj (1.0.1) lib/bj/table.rb:236:in `[]''
> bj (1.0.1) lib/bj/runner.rb:61:in `tickle''
> bj (1.0.1) lib/bj/api.rb:66:in `submit''
>
> I have seen other posts that suggest using
> ''transaction_without_cache_transaction'' or attempting to
only enable
> cache-money for certain models (instead of everything by default) but
> neither provided an adequate solution to the problem.
>
> It seems like this could be solved by either not including cache-money
> into each model, or being able to pass the correct information (or
> redefine it) for processes outside the normal rails app.
>
> Any help would be greatly appreciated.