Displaying 20 results from an estimated 10000 matches similar to: "Specifying asset hosts via a proc (ActionController::Base.asset_host)"
2006 Aug 15
0
Using config.action_controller.asset_host with ActionController::AbstractRequest.relative_url_root
I''m looking for some help with an issue I''m having using an external
asset host. I''ve got the lines below in my environments/development.rb
file.
# Enable serving of images, stylesheets, and javascripts from an asset server
config.action_controller.asset_host = "http://assets.example.com"
#make rails think it lives in /app
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 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
2007 May 24
0
asset tag helpers
Is it possible to add another asset tag helper
(ActionView::Helpers::AssetTagHelper ) ??
coz i''m using the ActionController::Base.asset_host = "http://
assets.example.com" for my static files.. and I want my app to get
video files from that host too.. but the thing is only images,
javascripts and stylesheets have the asset tag helpers with them..
what if i wanted videos? any
2007 May 24
0
asset tag helper
Is it possible to add another asset tag helper
(ActionView::Helpers::AssetTagHelper ) ??
coz i''m using the ActionController::Base.asset_host = "http://
assets.example.com" for my static files.. and I want my app to get
video/flash files from that host too.. but the thing is only images,
javascripts and stylesheets have the asset tag helpers with them..what
if i wanted videos?
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''] =
2012 Jul 27
0
How to get asset pipeline host url in Grape Api
Hi All
how can i get the asset pipeline host url in grape api to append to the
image url
in config/environments/development.rb
ActionController::Base.asset_host = "assets.example.com"
i have configured the asset url. How can i generate this image with asset host url in grape api
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
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
2007 Dec 28
0
Mocha 0.5.6 breaks ActionController test
Hi guys,
Could a core committer review and apply http://dev.rubyonrails.org/ticket/10602?
This would get rid of a failing test with the latest version of mocha
(0.5.6).
Thanks much!
Cheers,
Chu Yeow
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To post to this group, send
2008 Jun 28
5
asset_host?
Hi there,
I''m wrapping my head around Facebooker to try and build some integration points between an existing ROR application and facebook. I''ve managed to get FB talking to my app but when I tried to access my ROR app directly I noticed that all requests for images, CSS, and JS files were being made through my callback_url. Commenting out the following line from
2007 Dec 07
9
Merb-style development exception pages for Mac OS X
I like the merb-style exception pages where there''re links to open the
files listed in the stack trace in TextMate and the source around each
line a lot so I stole the idea (and the code!) and made a patch for
Rails: http://dev.rubyonrails.org/ticket/10401
Here''s how it looks like in Merb: http://yehudakatz.com/wp-content/uploads/stacktrace.gif
What do you guys think?
2007 Oct 04
4
2 more JSON / XML feature parity patches before Rails 2.0
I''d really like to see just 2 more functional changes to the JSON
serialization/encoding before we get to Rails 2.0.
First, and I think this is really crucial because without it all the
efforts to output JSON from ActiveRecord objects would have been half
in vain, is to allow us to do this in controllers:
@authors = Author.find(:all)
render :json => @authors.to_json(:only =>
2008 Jan 03
1
Trac not for general use?
Hi devs,
I was trying to open a new ticket with a minor doc patch at the
BackgroundDrb Trac (http://backgroundrb.devjavu.com/) and it seems
like only admins have permission to do so. Is this intended?
I read in the readme that patches should be mailed to this list, but I
much prefer to use Trac since there''s already one set up. Any reason
Trac is not open to registered Devjavu users?
2007 Dec 07
2
[ActiveSupport] Patches needing review: re-organization of #to_query methods, preservation of XML/JSON content-type
Just a quick pointer to some ActiveSupport patches hoping for reviews:
Puts Array#to_query and Object#to_query in the right places in
ActiveSupport - http://dev.rubyonrails.org/ticket/10395
Preserve user-specified content type for XML and JSON rendering
(currently it''s overridden and set to Mime::XML/Mimi::JSON -
http://dev.rubyonrails.org/ticket/10388
Oh and a tiny patch for
2007 Sep 28
2
Rails shouldn't output invalid JSON by default
Please check out this ticket (which would explain almost everything):
http://dev.rubyonrails.org/ticket/8762
So basically, Rails to_json methods produces invalid JSON out of the
box as it doesn''t quote all hash keys. This is valid JSON:
{
"id": 6589,
"code": "SIN",
"name": "Singapore"
}
This is not (Rails'' JSON encoders
2008 Jan 09
6
[PATCH] x 2 - Fix for "null pointer exception" when ask_status is called before worker is run, and docfixes
Sorry for attaching patches in emails to the mailing list, but I''m still
unable to login to Devjavu for Backgroundrb (I''m able to login just fine for
Merb''s Devjavu and submitted a ticket successfully).
Anyway, I encountered a bug when trying to #ask_status of a worker before
it''s run (or rather, before its result_hash has been set to something). Not
sure why
2013 Jul 10
0
ActionView::Template::Error Not a directory vendor/assets/javascripts/ production
Hello,
In production environment, I have this error ActionView::Template::Error
Not a directory vendor/assets/javascripts/holder.js when in my template I
have this line
<%= image_tag "holder.js/150x200" %>
My production.rb is :
Libapp::Application.configure do
# Settings specified here will take precedence over those in
config/application.rb
# Code is not reloaded
2010 Jun 08
1
session_options[:secure] resets session_id on every request
I''m working on an ecommerce site (in Rails 2.3) and I added:
ActionController::Base.session_options[:secure] = true
to ~/config/environments/production.rb
Now, every time I add something to my shopping cart and navigate away I
get a new session_id (which essentially empties my shopping cart).
How can I get the continuity of my sessions back, while still having the
session_id get set
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
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