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

Chad Woolley thewoolleyman at gmail.com
Mon Jan 22 13:19:37 EST 2007

In general, I'd say to create a directory  in the user's home
directory (possibly starting with a dot and hidden, or maybe not).
The user's home dir and /tmp are really the only places you can count
on having write access, and /tmp is out because it's likely to go away
on reboot.

Make sure it's descriptively named (probably containing your gem
name), so the user knows what it is when they see a new directory they
don't recognize in their home dir.

-- Chad

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?
> Jeremy
> _______________________________________________
> Rubygems-developers mailing list
> Rubygems-developers at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rubygems-developers

More information about the Rubygems-developers mailing list