I've got an existing webapp running on Rails. The plan is to setup a new server which will provide an API service, and eventually update the webapp to be a client of this API.
It seems like a good approach to achieving this would be packaging all the models as gems and sharing them between the two applications. Eventually the API service would be monolithic - containing all the models, but there is a period of development/migration where models will need to be shared.
Both the API and the webapp will be using the same database.
- What do I need to consider before jumping into packaging up all my models?
- Would it be worthwhile to package all the models into a single gem, individually package each model, or do some sort of logical grouping of models?
- How would I approach dependencies for gems?
For reference, here's a similar-ish question: Sharing models between Rails apps using gems
I'm also just getting familiar with packaging Ruby code as a Rubygem. (This might explain some of my questions above.)
[edit] I'm using Rails 2.3.14, not Rails 3.X.