From: Phillip Gawlowski Date: 2007-03-24T01:58:01+09:00 Subject: Re: How to share a collection of model files across many apps? 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? First, you might want to ask this at the Rails Mailinglist. Secondly, your solution wouldn't be portable, as only Unixes (MacOS, HP-UX, OpenSolaris, Linux) understand symlinks. Windows doesn't understand POSIX symlinks at all. -- Phillip "CynicalRyan" Gawlowski Rule of Open-Source Programming #15: If you like it, let the author know. If you hate it, let the author know why.