views:

39

answers:

2

i am thinking of releasing a rails application as a gem. it's sort of a wiki application which also stores user data in the db directory. what would be a good way to go to avoid the user data being overwritten, when a gem update is done?

example:

1) user gets version 1 of the gem/application. the data is stored in the gem directory.

2) user performs a gem update and gets version 1.1 -> the data is lost! (because there is a second directory now)

my questions are:

  • does it make sense to package rails applications in gems?
  • are there example for other rails applications that are packaged as a gem?
  • how would the problem with the user data be solved?

thanks! z

A: 

I guess using SVN or Git is the best way to distribute and update your application.

Pavel Pachkovskij
A: 

Gem is a bad idea for an application.

I would look into Warbler: http://caldersphere.rubyforge.org/warbler/

Karl
i was asking since both typo and radiant also have a gem which is actually used as an installer for their rails based app. why is this a bad idea?
z3cko
Maybe it's just a personal viewpoint, but I feel that the Ruby gem system is something that should only have libraries, stuff that helps development in Ruby. It shouldn't be cluttered with consumer apps, which should be properly packaged. Typo/Radiant are teetering on a border there, they're frameworks kind of like Rails, but at least Rails still boils down to programming in Ruby.
Karl