Topic: .com as root instead of localhost in dev mode

Guys I cannot work out what this is, maybe some of you can help?

I have an app deployed in production mode and working grand. I use fragment caching to cache things like User.all so that this is only called when a new User is added. I also page cache static pages.

So now I want to develop the site offline it's acting really weird. I downloaded the whole app so I have exactly what's on the web. I copied the production database to make it the development database also

Now when I load the app locally in development mode all links other than those on page cached pages have my .com as the root rather than localhost:3000. I cannot for the life of me work out why! The environment files look kosher. I've a feeling if I turn off caching in the environment files it would fix it but of course that breaks my code!

If I even try to log in locally it tries to send the information to the live app!

Anyone got any ideas?