Is it possible to use discourse as a rails engine? I would like to include it in my normal routes but will sacrifice if I have to.
I am interested in this too.
Not right now. I suspect it would actually be possible after a fair amount of clean up, but not in the short term, sorry guys
for rails engine
Rather than just mindlessly saying “upvote 100 times” can you please explain why this would be useful to you, and how?
With Rails engine it would allow to integrate with the existing rails app in a much better way rather using it as gem.
Can you explain what “in a much better way” means? What problem would it solve for you? Can you provide an example, or two examples?
I do want to have discourse to work with my base app in conjunction and I felt rails engine would be the better way as shown in below talk
Rails engine patterns
I might be wrong here, please correct me.
I would like Discourse to work as a plugin for base app without any changes to it as well base app.
That would save me the integration work and engines makes easy to use Discourse with existing app.
OK, thanks for the clarification, I think I understand what you mean now.
I’m not convinced that is a healthy case for Discourse, since this is a large and complex app – and will be larger and more complex every month that goes by. I think it is safer for everyone involved to have Discourse be a standalone app rather than some weird “pretend this app is a plugin to this other random app” case.
In my opinion as a big fan of Discourse, its biggest weakness is its failure to integrate discussion into larger apps, because of a license that doesn’t play well with others, and lack of availability as a Rails engine.
I would love to have Discourse as a Rails engine. I have multiple use cases where having a robust modern discussion forum is highly desirable - but in combination with other non-related features in my existing Rails/Ember apps. Users are already authenticated in the primary app, so having them re-authenticate just to participate in a discussion has a non-integrated user experience (because it wouldn’t be integrated, just a bolted-on adjacent app).
Also, choosing a license that plays well with other licenses would be helpful. Like many in the Ruby community, I have a preference for MIT (or Apache) because it isn’t invasive. If Discourse must use a GPL flavor (???), then something like LGPL for a Rails engine, so that it can be integrated with other licenses, while maintaining the “copyleft” only on the Discourse code.
Discourse is a great solution in most respects, but in its current incarnation, it doesn’t play well with others.
Then you should work on shared cookie auth. We do want to get there soon-ish!
I have come across some links which points how to share authentication among multiple apps.
Please let us know, which solution Discourse is going to follow.
When can we expect it ?
Discourse supports single sign on via CAS. You could use this instead of shared cookie auth. The UX would be almost the same, right?
I have come across this link,
The problem this solves is website owners being limited, for whatever reason, to one application for their entire service.
Example: An indie gaming company can’t afford heroku instances: A Spree shopping cart for their game and a discourse forum for their customers.
Having this be an engine capable rails application allows you to have 1 rails process and essentially 2 applications. In the above example spree would be mounted on “/shop” and discourse mounted on “/forum”, and maybe a further ActiveAdmin on “/admin”.
They share databases, resources, etc.
I thought license wouldn’t be much of a problem due it being used in the Web Backend and not front End?
I agree that having Discourse available as a Rails engine would be awesome. The ability to deeply integrate into an existing site strikes me as invaluable. For instance, having a common user model allows one to associate activity and reputation in the forum with permissions in the rest of the site.
I agree! I’d like to use Discourse as an engine for my open source app. A community for people to talk about PCI Compliance issues.
Having to re-authenticate is a really big pain and makes the UX suffer greatly.