I ran into t his little problem over the weekend.
I was trying to use the Private Pub gem (railscast) and everything worked swimmingly in development. However, Publish_to would fail in production with Errno::ECONNREFUSED (Connection refused - connect(2)).
Now, I could load the faye.js file from the browser while in production just fine, but the controller couldn't connect to the Faye server (yes, I did specifically set my RAILS_ENV environment variable to 'production').
Thinking that Thin's default binding to 0.0.0.0 was the problem, I started Thin by binding it to the server's internal IP and still no dice (though the JS would still load from the browser). I even went so far as to open all TCP ports... still nothing.
I eventually gave up due to time constraints, but I'm very curious/frustrated that I couldn't figure this one out.