# Using config.action\_controller.asset\_host with ActionControl

**URL:** <https://www.ruby-forum.com/t/using-config-action-controller-asset-host-with-actioncontrol/65060>\
**Category:** Rails\
**Created:** [August 15, 2006, 10:51pm UTC](https://www.ruby-forum.com/t/using-config-action-controller-asset-host-with-actioncontrol/65060 "2006-08-15T22:51:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgeiger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/258eb7/32.png) [@jgeiger](https://www.ruby-forum.com/u/jgeiger)\
**Post date:** [August 15, 2006, 10:51pm UTC](https://www.ruby-forum.com/t/using-config-action-controller-asset-host-with-actioncontrol/65060/1 "2006-08-15T22:51:51Z")

</div>

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](http://assets.example.com)”  
#make rails think it lives in /app  
ActionController::AbstractRequest.relative\_url\_root = “/app”

When I then include the this code in my layouts:  
\<%= stylesheet\_link\_tag ‘main’ %\>  
\<%= javascript\_include\_tag :defaults %\>  
it produces the following output:

...snipped...

My question is that if I’m serving from an asset host, why does it  
have the /app between the hostname and the stylesheets/javascripts? If  
I’m using an external host, it shouldn’t know or care where my  
application thinks it’s living, right?

Is this a bug, and if it’s not, is there a way I can get around it,  
while still having my application live in /app?
