similar to: Using config.action_controller.asset_host with ActionController::AbstractRequest.relative_url_root

Displaying 20 results from an estimated 2000 matches similar to: "Using config.action_controller.asset_host with ActionController::AbstractRequest.relative_url_root"

2006 Aug 10
2
Mongrel servers running in a subdirectory behind a proxy
I was able to find some information about this in the list archives, but it ended with a possible patch being submitted for Mongrel. I tried to follow a few of the instructions, but I''m still kind of stuck, since I''m not sure if what I''m seeing is the proper results. I have an application running on a cluster of mongrel servers, which is behind pen, which in turn is
2007 Oct 11
2
relative_url_root and javascript_include_tag
Hi. In my environment.rb, I have: ActionController::AbstractRequest.relative_url_root = "/foobar" In my layout, I have: <%= javascript_include_tag :defaults %> Question 1: I am getting an error: ActionController::RoutingError (no route found to match "/javascripts/prototype.js" with {:method=>:get}): When I remove the relative_url_root, everything works great.
2006 Jul 25
0
Bug in AbstractRequest.path() ?
ActionController::Routes.recognize() to obtain a URI for matching. If ActionController::AbstractReqeust:;relative_url_root is non-zero length, then the AbstractRequest::path chops that many characters off the request URI before returning the new URI. The problem is that this chopping happens whether or not the URI begins with the relative URL. I would expect the method to test whether the
2007 Dec 16
0
Specifying asset hosts via a proc (ActionController::Base.asset_host)
Hi all, I just submitted a patch that would allow you to pass a proc to ActionController::Base.asset_host rather than just using a %d wildcard (e.g. assets%d.example.com). Basically this frees you from the hard-coded assumption that you have 4 hosts numbered 0-3 and also allows you to do smarter things depending on the asset (e.g. images from a particular domain, stylesheets from another). The
2008 Jun 13
1
asset_host and ssl pages problem
I am configuring assets hosts for our site but am running into problems when navigating to an https page. Basically the server is trying to pull the assests out on https:// rather than http:/ but i do not have https configured on the assets server. I have dug around a bit and found this bit of code which should when a page is https:// serve the assests from the app server and when it is not https
2009 May 06
0
Setting config.action_controller.relative_url_root isn't working
Hi everyone, I''m trying to set the "config.action_controller.relative_url_root" config value but it isn''t working: config.action_controller.relative_url_root = "/de" When i try to view the http://localhost:3000/de page it gives me a "Routing Error", but if I try http://localhost:3000/ it works perfectly. Any idea about what this might be? -
2006 Mar 07
0
setting relative_url_root for static files in webrick
Hi, I am using webrick and want my application not be available on http://localhost:3000/ but http://localhost:3000/rails. So I found out I can set ActionController::AbstractRequest.relative_url_root = "/rails" in environment.rb. This works for controllers without further modifications. But for the static files, I have to put a "rails" directory into the public directory, and
2006 Jul 06
0
Apache 2.0 proxy
This is the configuration I use with Apache v2.0. I don''t use virtual hosts. This configuration lets Apache serve the images, javascripts, and stylesheets. ? This means that the application needs to be installed on the Apache server as wheel as the mongrel server(s) in multiple server environments. ? If i wanted to flatten the resource directories I could avoid the rewrite rules,
2010 Jul 08
0
Rails3 -- Replacement for ActionController::Base.relative_url_root?
I have a post on stackoverflow which outlines the problem I am having: http://stackoverflow.com/questions/3181746/what-is-the-replacement-for-actioncontrollerbase-relative-url-root In short, I ported a rails 2.x to rails3 and started getting a deprecation warning for using ActionController::Base.relative_url_root. I switched to using config.action_controller.relative_url_root and while any
2009 Mar 18
1
uninitialized constant ActionController::AbstractRequest (NameError) with rails 2.3
Hi guys, I''ve just installed Rails 2.3 and I am using the clearance plugin with cucumber features. When I run rake features I get this "uninitialized constant ActionController::AbstractRequest (NameError)" error from webrat trying to call AbstractRequest which now is called Request (I think). My question is : Is there any way to alias the old name to have backwards
2008 Mar 20
2
Anyone having problems with asset_host not getting set up right?
Hey All, I think I found a bug but I would be suprised since it would cause major problems. We setup the asset_host in init.rb with: if File.exist?(facebook_config) FACEBOOKER = YAML.load_file(facebook_config)[RAILS_ENV] ENV[''FACEBOOK_API_KEY''] = FACEBOOKER[''api_key''] ENV[''FACEBOOK_SECRET_KEY''] =
2008 Jan 31
2
Facebooker and file_column
Facebooker URL Rewriter stuff overloads ActionController::AbstractRequest.relative_url_root, causing a conflict with the plugin file_column and possibly other utilities. file_column constructs image URLs using the server host and relative_url_root This is not related to the sandbox patch I added to the rewriter. Facebooker overloaded relative_url_root before I touched it. I''ve
2009 Jul 20
1
CSS issue when using SubUri and Passenger
I am testing another application in local in my environment.rb I wrote config.action_controller.relative_url_root = "/elnino" config.action_controller.asset_host = "http://opticoaching.local" I defined correctly the vhost (I have already odne it for another app which is running well...) <VirtualHost *:80> ServerName opticoaching.local DocumentRoot
2014 Apr 26
0
jquery_ujs.js 404
I am getting this annoying error which relates to jquery_ujs.js not being served. Any clues? This is the site link: http://test.kopy.com.br/home/index GET http://test.kopy.com.br/assets/jquery_ujs.js?body=1 404 (Not Found) index:11 GET http://ads.panoramtech.net/loader.js?client=tac net::ERR_BLOCKED_BY_CLIENT rev.js:4 Error in event handler for (unknown): Cannot read property 'state' of
2006 Jan 04
1
[BUG?] image_tag
i''ve got the latest ruby and rails on this box and am seeing that image_tag will turn something like /foo/bar.jpg into /foo/foo/bar.jpg in the following situation: /ror/foo/public /var/www/html/foo -> /var/ror/foo/public/ image_tag("/foo/bar.jpg") this is exactly how compute_public_path is written to work: def compute_public_path(source, dir, ext)
2011 Sep 02
1
can't compile assets on prod due to asset_host config && SSL requirement
My production asset_host config looks like this: config.action_controller.asset_host = Proc.new { |source, request| if request.ssl? "#{request.protocol}#{request.host_with_port}" else "#{request.protocol}assets#{(source.length % 4) + 1}.example.com" end } ...which is more or less straight from the docs:
2008 Jan 09
1
relative_url_root and problems with CSS url()
I''m using relative_url_root to allow my app to be run from a sub- domain. Things work fine except with images that are referenced in my CSS code. For example, background-image: url(/images/bg_image.jpg); does not take into account the value in relative_url_root. Consequently, my background image (and other images similarly referenced in my stylesheet) are not loadable. Anyone know a
2010 Aug 05
5
asset_host and ActionMailer
After digging through the rails code to figure out why my asset_host wasn''t getting applied to emails, I realized that it''s because the config object in the context of a mailer is config.action_mailer and not config.action_controller. This means you need to set asset host separately for emails, as config.action_mailer.asset_host. Should this be considered a bug? Is it really
2009 Sep 26
0
Paperclip with external url and asset_host?
Hi, I''m trying to get Paperclip to work with asset_host and have totally failed to do so. The idea is to use asset_host to specify the url that I want to use for my image hosting (www.unlimitedwebhosting.co.uk) so that link helpers will use the image host location instead of the local file system. This works really well and in truth I''m totaly blown away by the power and
2009 Mar 26
0
Error On relative_url_root
I''m attempting to mash together Adva CMS'' Fckeditor and the Fckeditor plugin provided by Scott Rutherford. http://blog.caronsoftware.com/2008/6/21/fckeditor-plugin-0-5-1-released The Scott''s plugin has a controller than handles the Fckeditor file upload and browse, but it errors out on the following lines. def upload_directory_path uploaded =