# Merging Spree and BrowserCMS for my app

**URL:** <https://www.ruby-forum.com/t/merging-spree-and-browsercms-for-my-app/175052>\
**Category:** Rails\
**Created:** [September 7, 2009, 4:20am UTC](https://www.ruby-forum.com/t/merging-spree-and-browsercms-for-my-app/175052 "2009-09-07T04:20:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [September 7, 2009, 4:20am UTC](https://www.ruby-forum.com/t/merging-spree-and-browsercms-for-my-app/175052/1 "2009-09-07T04:20:38Z")

</div>

Hello All,

I have a fixed price contract to develop a website for a training  
organisation that will show courses they offer,  
dates, times and venues when they run. There is also a fair amount  
of typical CMS content, and the potential for more course content,  
so BrowserCMS seems well suited.

They also want to have bookings and payments online via PayPal, so  
I have been considering Spree, although on further analysis I only  
need/can use the shopping cart & checkout, plus the data structures  
(models) from Spree. I think I can avoid the user seeing the Spree  
backend  
or product pages (nothing personal, these pages are just more CMS  
than product like.)

So far my preferred strategy is (not necessarily in order) :

1. merge the spree and BCMS tables into a single database.  
The only naming overlap is users, schema\_migrations and potentially  
sessions.
2. if they can’t share sessions, then patch BCMS to create/delete Spree  
sessions  
in parallel with its own sessions.
3. run Spree and BCMS independantly with Apache and Passenger on  
different  
subdomains.
4. write a BCMS module to load spree’s models
5. patch the new admin panels into the BCMS admin
6. Create product selection forms on BCMS pages that use the Spree  
models,  
eventually constructing an order and redirecting the customer to  
the spree cart on its own subdomain.

Any feedback/warnings/advice/encouragement/gasps of horror would be  
welcome.

While this may not be following the golden path toward mountable apps,  
hopefully there will be some contribution toward a nice integration  
between these (IMHO) flagship Rails projects that together would cover  
the needs of so many business sites.

Cheers,

Gary McGhee  
Buzzware Solutions

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 22, 2010, 3:11pm UTC](https://www.ruby-forum.com/t/merging-spree-and-browsercms-for-my-app/175052/2 "2010-02-22T15:11:05Z")

</div>

Hi,  
I am also doing same thing. I also have “users” table overlap in the  
BCMS and in my Spree application. We decided to use the “users” table of  
“spree” application.  
Here is problem as BCMS already have a “user.rb” model so How would I  
make the connection to the “spree” application database for “users”  
table.  
I have intsalled the browser cms gem due to that all code went to the  
ruby dir.  
How would I solve this problem?  
How should I override the model?  
Do you have any idea?

Thanks,  
Tushar

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [March 2, 2010, 12:31am UTC](https://www.ruby-forum.com/t/merging-spree-and-browsercms-for-my-app/175052/3 "2010-03-02T00:31:37Z")

</div>

Tushar G. wrote:

> Hi,  
> I am also doing same thing. I also have “users” table overlap in the  
> BCMS and in my Spree application. We decided to use the “users” table of  
> “spree” application.

I went the other way - renaming the Spree table. See  
[http://railsdog.lighthouseapp.com/projects/31096/tickets/739-one-line-change-to-make-spree-cope-with-its-users-table-being-renamed-in-order-to-share-the-database-with-another-integrated-app](http://railsdog.lighthouseapp.com/projects/31096/tickets/739-one-line-change-to-make-spree-cope-with-its-users-table-being-renamed-in-order-to-share-the-database-with-another-integrated-app)

You may be able to use a similar technique on the browsercms side.

Cheers

Gary
