Ruby / Rails / Discourse How to set the root directory

I am trying to run wordpress using apache and php, as well as discourse using ruby. I am currently doing this with a proxy. Here is what I am trying to accomplish:

When a user visits http://something.com/ , he can see my wordpress site.

When a user visits http://something.com/forum , he becomes a member of the discourse.

The apache proxy is working. I have verified that the discourse page is loading, but unfortunately all assets are not loading. What for? Script tags are as follows:

<script src="/assets/..."></script> 

The problem is that then the request is sent to http: // something / assets / ..., which is not what I want. I tried to do the following:

  • Change the configuration of /application.rb. I changed config.relative_url_root to "/ var / www / discourse" and to / forum. The webpage will output this error:

Not found:/

  1. I tried to set the tag in the index.html file, but could not find it in the public directory.

  2. I tried to modify the config / routes.rb file, but the server did not even start.

You might want to know that I am not a Ruby programmer, although I have programming experience with other languages.

In addition, when I modified the config / application.rb file, I did not enter any commands to reload the file. When I change the config / routes.rb file, I will add my extra code to the very top. I forgot what I did, but it has something to do with installing the root directory.

So: a long story: how to set the root directory for discourse / ruby ​​on rails?

+5
source share
1 answer

EDIT: I just found out that a great software forum has come out. Much better than discourse in speed, ease of use and installation, and it looks. It is called Flarum . And this is awesome.

It is still in beta, so there are a few problems, but otherwise I'm ready to use it. Rumor has it that it will be released in July 2015, but I don’t know. All I know is that Flarum is a forum for me.

Community support is fine as it comes from esotalk and fluxbb , so yes.

Old answer:

While I can’t say for sure that this is the answer, I have found a solution to my problem.

Although discourse is great forum software, and I highly recommend it, I apologize for it, but rubies on rails and apache just don't like each other. Instead, I will switch to codoforum , a great forum that is still in beta. It looks a little worse than a discourse, but I find it acceptable for my needs. It is also a little faster.

Codoforum website . Codoforum is written in PHP, so it is very easy to integrate with Wordpress.

0
source

All Articles