Topic: Sharing data between applications

We are considering rails for a large upcoming project.

We are building 3 distinct applications that will reside on separate websites but will share company account and user details between them.

Although the applications are related, we want our clients to be able to use them independently of each other and are therefore aiming for loose coupling. Still, there are a couple of cases where it would probably make most sense to let applications share some database tables.

What would be a good way to go about organizing data and code for this project? If applications access a common database, they obviously need to share models as well... but what would be a good way to organize this?

I guess a possible solution would be to create one big project with all the code and a single database (not sure how I would deploy this to individual websites though). But I would really prefer to have multiple databases and a project for each application and maybe a couple of projects for shared code if necessary.

I come from a C# background and my instinct here is to somehow separate out the data layer and share it between applications but I have no idea how to approach the problem with Rails.

Can anyone point me in the right direction?