# ActiveRecord shared models

**URL:** <https://discuss.rubyonrails.org/t/activerecord-shared-models/40652>\
**Category:** rubyonrails-talk\
**Created:** [March 19, 2009, 2:44pm UTC](https://discuss.rubyonrails.org/t/activerecord-shared-models/40652 "2009-03-19T14:44:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [March 19, 2009, 2:44pm UTC](https://discuss.rubyonrails.org/t/activerecord-shared-models/40652/1 "2009-03-19T14:44:47Z")

</div>

I'm attempting to build a somewhat non-standard architecture around the Rails apps that I'm building for a customer. We're looking for a way to be able to share models across projects using RubyGems.

The reasons we want to take this approach are: 1) Shared model logic, without duplication 2) Quick development of new applications 3) Small test suite per application 4) Mini-apps (potentially non-web) without full rails stack

I have seen solutions related to symlinking the app/models folders into each application or using svn:externals, but these both seem suboptimal.

Ideally, I'd like to be able to:

require 'rubygems' require 'models'

and have access to any of my models.

I have experienced some headaches with plugins and I expect to see more. Does anyone have any suggestions for implementing this type of architecture or am I doomed to have one monolithic Rails app?

Best, Michael Guterl

---

<div class="post-metadata">

**Author:** ![Starr\_Horne](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@Starr\_Horne](https://discuss.rubyonrails.org/u/Starr_Horne)\
**Post date:** [March 19, 2009, 3:12pm UTC](https://discuss.rubyonrails.org/t/activerecord-shared-models/40652/2 "2009-03-19T15:12:18Z")

</div>

Have you tried the new plugin system in rails 2.3? It may not be exactly what you're looking for, but it allows you to have models in plugins.

SH
