-
Notifications
You must be signed in to change notification settings - Fork 258
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
production site being served from sub-directory #39
Comments
I don't have much experience with hosting within a subdirectory. What method are you using to do this? |
Hi Sam, I'm using Phusion Passenger on my production environment. It provides an Apache directive to cater for hosting an app inside a sub-directory. Here's a link explaining its usage: http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri Yes, I've also tried setting I notice that there is a tinymcepreinit (may not have gotten this exactly right!) JavaScript function which uses 'config.assets.prefix' as its base value upon initialisation. Could this be the cause of my problems? Regards, Sent from my iPad On 2 Feb 2012, at 01:07, Sam Pohlenz [email protected] wrote:
|
This should be fixed in the latest version (gem will be released soon). When you precompile your assets, make sure you set the relative url root environment variable: |
I've upgraded to version 3.4.8 of the Gem and tried to use your suggestion about precompiling assets and the two files in question, 'editor_template.js' and 'en.js' are still being referenced directly from the assets directory: i.e. http://example.com/assets/tinymce/themes/advanced/editor_template.js?3.4.8 they are not taking into account the sub-directory. |
Couple of things that might help:
|
Hi Sam, I'm running Rails 3.1.3 and I'm including TinyMCE through app/assets/javascripts/application.js I'm deploying through Capistrano; using the 'deploy/assets' rake tasks to handle asset precompilation. cheers, On 7 Feb 2012, at 00:25, Sam Pohlenz wrote:
|
How are you setting the environment variable in your I believe the following should work:
Is that similar to what you have now? |
Hi Sam, I just upgraded to Rails 3.2.1 and added the following entry to 'config/environments/production': config.relative_url_root = "/sub-uri" and tinymce-rails is serving the necessary javascript files from the correct location. All is well :) I found this link that gives some more detail on same problem I was experiencing: http://www.redconfetti.com/2012/01/configuring-rails-3-1-3-under-sub-uri/ I hope this comes in handy for others who may have the same problem. cheers, On 7 Feb 2012, at 11:30, Sam Pohlenz wrote:
|
Is there a way to make tinymce-rails aware that the app. is being served from a sub-directory on the production server? I notice that it appends 2 additional js files into the page at runtime; langs/en.js and themes/advanced/editor_template.js. In my production setup, the assets directory sits under a sub-directory on my server, however, tinymce-rails doesn't account for this in the url path to the files mentioned above. Am I missing something?
The text was updated successfully, but these errors were encountered: