SitePoint Sponsor |
|
User Tag List
Results 1 to 12 of 12
Thread: Combining Rails apps
-
Nov 24, 2005, 12:03 #1
- Join Date
- Jul 2003
- Location
- Jerusalem
- Posts
- 158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Combining Rails apps
Does anyone know how to combine two self-contained Rails apps?
I rebuilt one of our sites in Rails, and now want to add a forum to it. Decided to go with RForum in order to keep everything Rails. But RForum is its own Rails app, and I am not sure how to make it part of the rest of the site.
Thanks.
-
Nov 24, 2005, 14:49 #2
What are you trying to integrate? Why can't you just put the forum in as a subdomain or subdirectory of the site?
-
Nov 24, 2005, 14:57 #3
- Join Date
- Jul 2003
- Location
- Jerusalem
- Posts
- 158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by vgarcia
Also, with RForum in particular, it uses a site.rb file to define some global config settings. I am afraid those will somehow effect other areas of the main site.
-
Nov 24, 2005, 15:34 #4
- Join Date
- Apr 2005
- Location
- Murcia, Spain
- Posts
- 66
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Maybe you could do it but by analyzing the content of each file, controller, model, helper and view very carefully to make sure they don't coincide. Then, if there are files that have the same name (like the site.rb you mention in 2 apps for example) then would it be possible to merge them into one file as long as the methods inside don't clash. Just some thoughts
-
Nov 24, 2005, 15:38 #5
- Join Date
- Jul 2003
- Location
- Jerusalem
- Posts
- 158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Mmmm, that's what I was afraid of - having to go through all the methods and views and tweaking everything to integrate.
Shame there is not an easier way to plug premade Rails apps - such as a discussion board - into an already existing app.
I guess for now I can just go with a PHP board and put it in the public folder.
-
Nov 24, 2005, 15:43 #6
- Join Date
- Apr 2005
- Location
- Murcia, Spain
- Posts
- 66
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I don't know what server you're running but they just released lighttpd 1.4.8 and you can now stick several rails apps under one domain. I'm working on setting that very thing up right now for a site.
So you can do site.com/blog, site.com/forum etc, etc..
What I'm not entirely sure of is whether or not that can be done in sub folders of an existing app. I assume so and that I just need to fugre out exactly how.
-
Nov 24, 2005, 15:49 #7
- Join Date
- Jul 2003
- Location
- Jerusalem
- Posts
- 158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Unfortunately, we are running off a Windows server, so lighttpd is not an option. I am using Apache.
-
Nov 24, 2005, 15:52 #8
- Join Date
- Apr 2005
- Location
- Murcia, Spain
- Posts
- 66
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm sure I've read that it's already possible on Apache. Have a look round textdrive and the rails sites.
-
Nov 24, 2005, 19:13 #9
Originally Posted by RyaninZion
http://blog.lighttpd.net/articles/20...ple-rails-apps
Perhaps its worth getting hold of a Unix box, a VPS or something. IMO, Windows is really not an ideal platform for Rails.
-
Nov 24, 2005, 23:22 #10
- Join Date
- Jul 2003
- Location
- Jerusalem
- Posts
- 158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I guess the easiest thing with Apache will be to put the forums app under a subdomain. Problem is, will I be able to still utilize the global template from the mother app in the forum?
I agree installing Apache on our server would be best, but for now we are stuck with Windows. Those I work with are a little apprehensive about switching to Linux, fearing they would no longer know how to manage the server.
-
Nov 25, 2005, 06:11 #11
Originally Posted by RyaninZion
-
Nov 25, 2005, 07:36 #12
- Join Date
- Jul 2004
- Location
- Gerodieville Central, UK
- Posts
- 446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This is probably one of the main downer on Rails imo ...
Like people are suggesting you want to install under different subdomains. This will add some complications for a portal-style site where user logins persist across subdomains. The main thing here is to make sure that your cookies / sesssions are set to work over the subdomains (i.e. only set them on a 2nd level domain level). You may need to hack the user models and controllers for the each subdomain too inorder to merge things together. Though it sounds a pain, it's probably not too bad to do
Bookmarks