[Rubygems-developers] where does persistent data go in a gem?

Austin Ziegler halostatue at gmail.com
Wed Jan 31 16:29:02 EST 2007

On 1/22/07, Jeremy Stell-Smith <jeremystellsmith at gmail.com> wrote:
> I have a little continuous integration server that I want to release as a
> gem.  It's a rails app that looks at a folder instead of a db.  It all works
> rather well, except I'm not sure where this folder should live.
> Assumptions right now are :
> 1) the application runs in it's entirety from it's gem home
> 2) there's a "cruise" executable that is accessibly from anywhere to do
> "cruise start", "cruise add_project", etc
> 3) it prompts the user for where to put place it's build directory on it's
> first install and subsequent updates.
> 1 & 2 make sense, but 3 kind of sucks.  a user could care less where this
> stuff lives, and even if they do, they want to specify it once, not on every
> install, what if they don't remember where it lives?
> I guess this is a problem others have faced and solved.  What's the
> conventional wisdom about where to put these types of things?

Make a simple installer option, e.g.:

  cruise config

That way, someone can configure where they want it installed. 3 is the
*right* choice, but explicitly make a configuration option. See ruwiki
(which is essentially dead, but solved this problem a long time ago).

Austin Ziegler * halostatue at gmail.com * http://www.halostatue.ca/
               * austin at halostatue.ca * http://www.halostatue.ca/feed/
               * austin at zieglers.ca

More information about the Rubygems-developers mailing list