From: "RubyTalk@..." Date: 2007-03-24T02:44:10+09:00 Subject: Re: How to share a collection of model files across many apps? On 3/23/07, Elliott Blatt wrote: > Hi, > > I've got three files that (a.rb, b.rb, c.rb) that currently live in > app/models. > I'd like these models to shared by multiple rails apps. These models are > associated with a separate database. > > My rails projects are contained in a directory that looks like this: > > projects/ > > proj1/ proj2/ proj3/ common/ > > > common/ > a.rb b.rb c.rb > > > My idea is to do this: > > In proj1/lib/, symlink to ../../common/ > > lib/ > common/ (which is a symlink) > > > My question is: > How do I tell rails to load the files pointed to by the symlink named > 'common' in the lib directory? > > > I've tried: > > cofig/environment.rb > > include 'lib/common' > > Thanks for your input. > EB > > -- > Posted via http://www.ruby-forum.com/. > > If you are using svn: svn externals works well for this. I would create a tag of the libs so when you create tags of your projects you will not have to change the external -r option. http://svnbook.red-bean.com/en/1.0/ch07s03.html There are unix programs that will keep directories synced. Stephen Becker IV