# Config prob? - prod app trying to pull assets from localhost

**URL:** <https://www.ruby-forum.com/t/config-prob-prod-app-trying-to-pull-assets-from-localhost/178516>\
**Category:** Rails\
**Created:** [November 5, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/config-prob-prod-app-trying-to-pull-assets-from-localhost/178516 "2009-11-05T19:17:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunaclaire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f4b2a3/32.png) [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Post date:** [November 5, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/config-prob-prod-app-trying-to-pull-assets-from-localhost/178516/1 "2009-11-05T19:17:49Z")

</div>

I just got deployed for the first time w a new (to me) hosting  
provider yesterday with an evolving app on a project for a client and  
one thing I still am having pros with is that all the assets the app  
needs (image, css, and js files) are not being accessed because the  
app is trying to get them from localhost.

Firebug shows the following kind of thing within the script tags as  
the src for the JS files:

src=“[http://localhost:3000//javascripts/prototype.js?1257382712](http://localhost:3000//javascripts/prototype.js?1257382712)”

I havent seen this before on other apps I’ve deployed elsewhere… I  
cant see anything where my config is hardwiring this or anything.

So, here are my thoughts and maybe someone can tell me if any of them  
look to be the cause:

1. it’s me - somewhere I _have_ screwed up my configuration within the  
app itself… maybe someone has suggestions where to look

2. it’s the hosting provider - in the sense that there’s something in  
my deployment with the host that I got wrong… again, any ideas of  
where to look? (I know this could be hard to answer 'cause I’m keeping  
the hosting provider nameless)

3. it’s DNS - I say this because the client hasnt set up DNS yet  
(stealth mode thinking) and the app is being reached by typing in the  
IP addrs… could this be causing the app to look to localhost? not  
sure if that’s the way things work and the app goes from page to page  
using the IP addrs as the domain vs localhost (which it only seems to  
do for these assets)

hoping someone has seen/fixed this before or just knows more than me  
and can help

---

<div class="post-metadata">

**Author:** ![lunaclaire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f4b2a3/32.png) [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Post date:** [November 5, 2009, 9:49pm UTC](https://www.ruby-forum.com/t/config-prob-prod-app-trying-to-pull-assets-from-localhost/178516/2 "2009-11-05T21:49:25Z")

</div>

OK, it was _me_, but I’ll share for anyone else who may come  
across this…

I’m using the facebooker plugin. it has a config file  
facebooker.yml… that has the following settings (amongst others):

development:  
callback\_url: [http://localhost:3000/](http://localhost:3000/)  
set\_asset\_host\_to\_callback\_url: true

It has separate settings for production… can you guess?

I neglected to change that callback\_url for the production environment  
after I setup the static ip addrs with the hosting provider!

Also, for a FB Connect app you should set  
set\_asset\_host\_to\_callback\_url to false.
