Model generator: Invoke active_record only 1x for mulitiple models?

Pete,

this project saved a couple of years of my life already: https://github.com/burke/zeus

Basically, it runs rake jobs, generators, destroyers, tests… in under a second by preloading the various environments and then just forking an appropriate existing process when a command is triggered, real life-saver

Borna

Yes, zeus is a nice one to speed up development lifecycle. There’s also spring, a new tool from jonleighton that’s under test and is likely to be the default integration with Rails as part of the development process, I recommend you guys to take a look.

Pete, I think the path that zeus and spring are taking is the way to go, since it does not help only with model generators, but speeds up generators, console, tests, and everything else related to our development workflow.

Thanks a lot for the feedback, guys!

This is awesome! Really looking forward to seeing that in Rails!

For now you can just install the gem (like spring) and use its commands in any 3.x app, it doesn’t even need to be in your Gemfile. Check its readme for more info.

This seems really cool. Is Spring appropriate running on production
servers? For example, on deploy, many different rake tasks may be invoked
(asset compilation, database migrations, etc...) and having something like
this spawned could result in a significant speed-up.

I usually make a deployment rake task and spawn other tasks from there,

this way you save up on environment load times so zeus / spring bring no added benefit (only added unknowns). Also see the “rake multitask” feature (http://stackoverflow.com/questions/5606290/how-do-i-launch-multiple-rakes-in-parallel-from-a-ruby-script)

Borna