# Adding Discourse to existing Ruby on Rails site

**URL:** https://meta.discourse.org/t/adding-discourse-to-existing-ruby-on-rails-site/226331
**Category:** Development
**Created:** [May 6, 2022, 2:12pm UTC](https://meta.discourse.org/t/adding-discourse-to-existing-ruby-on-rails-site/226331 "2022-05-06T14:12:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![iraszl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iraszl/32/120318_2.png) [@iraszl](https://meta.discourse.org/u/iraszl)
#### Post date: [May 6, 2022, 2:12pm UTC](https://meta.discourse.org/t/adding-discourse-to-existing-ruby-on-rails-site/226331/1 "2022-05-06T14:12:19Z")

</div>

I have a ROR 6.1 site with Devise, and many existing users. I would like to add discourse to this site under a subdomain like [forums.example.com](http://forums.example.com), and I want to make sure if you’re logged in on [example.com](http://example.com) in devise you’re also logged in on discourse under [forums.example.com](http://forums.example.com). How can this be achieved if at all?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 6, 2022, 2:22pm UTC](https://meta.discourse.org/t/adding-discourse-to-existing-ruby-on-rails-site/226331/2 "2022-05-06T14:22:16Z")

</div>

I think all you’d need to do is figure out [DiscourseConnect - Official Single-Sign-On for Discourse (sso)](https://meta.discourse.org/t/discourseconnect-official-single-sign-on-for-discourse-sso/13045) on your existing site.

---

<div class="post-metadata">

### Author: ![iraszl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iraszl/32/120318_2.png) [@iraszl](https://meta.discourse.org/u/iraszl)
#### Post date: [May 8, 2022, 6:40am UTC](https://meta.discourse.org/t/adding-discourse-to-existing-ruby-on-rails-site/226331/3 "2022-05-08T06:40:54Z")

</div>

🙏 Thank you! Exactly what I needed.
