-
Notifications
You must be signed in to change notification settings - Fork 17
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
Does not honor RAIL_RELATIVE_URL_ROOT for Passenger based deployments #11
Comments
Can you change related urls to get it work with your app if that works let On Fri, May 27, 2011 at 10:16 PM, kodbale <
sαη∂ιρ Rαηѕιηg JOsh SOftware PVt. LTd. web www.joshsoftware.com |
Firstly, thanks for responding. Your plugin did save me a lot of time and I am thankful to you for sharing it and maintaining it. Given a project time crunch, I did get it to work on my installation by just hardcoding the paths. Unfortunately that is not a very portable or elegant change - I had to make approximately 10-20 edits in the HTML/JS code to get it to nominally work on my installation, but since all the locations were easily "grep"able, it was not really that bad. Using the ActionView helpers such as image_tag would be ideal but since the file upload dialog is static HTML, there was little I could see as a quick fix hence I adopted the hard-coded path hack! |
Cool..Sounds great !! But As per my consideration all the urls needs to loaded through yml file so Thanks!
sαη∂ιρ Rαηѕιηg JOsh SOftware PVt. LTd. web www.joshsoftware.com |
Sure, it would certainly help to have a configuration setting. But on the other hand, why use a configuration setting when the configuration is already available as an environment variable. It leaves one less thing to worry about right? One can check if RAILS_RELATIVE_URL_ROOT is defined, use it if it is and ignore it if it not defined. Another idea is to use the value defined in "config.action_controller.relative_url_root" thereby pushing up the responsibility for setting the URL to application layer instead of the plugin. I wonder if that would work? Either way, it still means that the HTML/JS needs to be tweaked to use ERB (and RJS?). That is what I would be concerned above all else. |
Hi,
I am having issues in getting the plugin image/upload mechanism to work properly when deployed under passenger to shared environment. My application is hosted in an environment shared by multiple applications.
http://myhost.com/mygroup/myapp/
The TinyMCE installation uses hardcoded paths to images such as:
"/images/tiny_mce/spinner.gif" which will look for the file at:
"http://myhost.com/images/tiny_mce/spinner.gif" which makes it an invalid link.
The Passenger installation passes an environment variable called RAILS_RELATIVE_URL_ROOT which could be used in such cases to link to the right image at:
"http://myhost.com/mygroup/myapp/images/tiny_mce/spinner.gif"
I have tried using the :relative_url and :document_base_url settings but could not get either to work properly.
I am either missing something fundamental / doing something stupid but otherwise have not been able to get the plugin file upload to work.
Any suggestions?
The text was updated successfully, but these errors were encountered: