Question: Is there some way to output an action in Rails template? Something equivalent to ASP.NET MVC Html.RenderAction ?
I need to render some stuff in sidebar and I don't want to put queries in partials or specific controller. So far I can think of only one way - put something into @stuff (by whatever means) instance var and let render find the proper partial or specify it explicitly. It would be better to be able to change only one file to change the contents of sidebar (as in ASP).

Answer: 
If you want to **avoid an anemic domain model** you have to abandon the classic n-tier, n-layer CRUDY application architecture. Greg Young explains why in [this paper on DDDD](http://abdullin.com/storage/uploads/2010/04/2010-04-16_DDDD_Drafts_by_Greg_Young.pdf). DI is not going to change that.

[CQRS](http://abdullin.com/cqrs) would be a better option, and DI fits very well into the small, autonomous components this type of architecture tends to produce.
I'm not into the Java sphere, but according to your details in your questions it seems like you use some kind of MVC framework (since you deal with Controllers and domain). But I do have an opinion about how to use DI in a Domain Driven architecture.

First there are several ways of doing DDD: Some uses MVC in presentation and no application service layer between MVC and Domain. Other uses MVP (or MVVM) and no service layer. BUT I think some people will agree on me that you very rarely inject repositories (or other services...). I would recommend to inject Repositories in Command (using MVC and no service layer), Presenter (if you use MVP) or Application Services (if you use service layer). I mostly use an application layer where each service get the repositories they need injected in constructor.

Second I wouldn't worry about switching between IoC containers. Most container framework today support ctor injection and can auto-resolve parameters. Now I know that you're a Java developer and I'm a MS developer, but MS Practices team has a Common Service locator that can helps you in producing code that are extremely non-dependent of which container framework you uses. There is probably some similar in the Java community.

So go for option 2. Hope I pushed you into right direction.