-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Juvia not working properly when deployed to a sub URI #13
Comments
Yes, Juvia is not at all written with sub-URI deployments in mind. It probably doesn't take too much work to get it working, but I do not want to write support for this because Juvia already works for my use cases. If anyone is willing to contribute support for sub-URI deployments, please go ahead. |
My "work-in-progress" branch https://github.com/stbuehler/juvia/tree/wip should work with sub-URI deployment. I'll try to rebase my stuff onto the current master as soon as i have some time, now that it looks like upstream development continues :) |
Would you be interested in committing directly to the main repository and help with maintenance? I could give you write access. |
@stbuehler thanks for linking a branch that works with sub-URI deployment. Seems like a valuable use case as it would allow me to deploy without purchasing a new domain just to test out juvia. 👍 for committing it back to the main repository (pull request maybe). |
@JangoSteve, if you have time, could you have a look at merging @stbuehler's fork? |
Guys, please incorporate at least stbuehler 's commit 7c1ca8e from this wip rbanch. I cherry-picked it locally here and it seems to fix the sub-URI issue. |
I'm reviewing pull request #47 with the sub-URI fix. |
`config.action_controller.relative_url_root` can be used to tell Rails that you are deploying to a subdirectory. The default is `ENV['RAILS_RELATIVE_URL_ROOT']`. the asset pipeline doesn't like using the value from request script_name, although this should contain the correct value and should theoretically be possible :(
I have installed Juvia on my host, but I did not want to create a VirtualHost for it, so I decided to install it in a sub URI (e.g., http://example.com/juvia).
I could successfully run it after some struggling, but unfortunately it does not work properly, and the apparent reason is because it is on a sub URI. The problem specifically occurs when I try to submit a comment, but it also happens on other occasions. These Apache logs seem to confirm that:
[Thu Oct 18 03:04:45 2012] [error] [client 192.168.1.1] File does not exist: /var/www/html/api, referer: http://xyz.com/juvia.html
(The file juvia.html above is just a test).
As you can see, it is requesting the following URL:
http://example.com/api/FOO
instead of:
http://example.com/juvia/api/FOO
The second one would be the correct URL, since (as I explained) Juvia is running in a sub URI. I tried modifying some Ruby files from the project and recompiling the static assets, without success. It would be really great if I could deploy this application in a sub URI.
Please let me know if you need more information. Thanks.
The text was updated successfully, but these errors were encountered: