0

I cloned a github repo using subdomain fu but I can't seem to get the site to load properly. I always get the same error:

I tried signin.localhost.local:3000, which seems to be working to get the signin/signup pages working. However, when I go to login (from signin.localhost.local:3000) it keeps "signin" at the front like so:

sub1.signin.localhost.local:3000

in prod it works perfectly but for some reason it keeps signin here when it is not suppose to. Also, if I try just removing "signin" and going to sub1.localhost.local:3000, it tells me again "can't find account with subdomain = ". very frustrating.

Here is my hosts file right now:

127.0.0.1       localhost signin.localhost.local sub1.localhost.local signup.localhost.local
Matthew Berman
  • 8,481
  • 10
  • 49
  • 98

2 Answers2

0

Just to confirm, you are restarting apache?

James Corr
  • 81
  • 8
  • No, I haven't needed to do that thus far to get the little fixes I've got working. Didn't know I had to do that. I'm running this on my local machine. – Matthew Berman Jan 13 '12 at 22:44
0

Working with subdomains in development mode can be really tricky. If you're on a Mac and the project is using a reasonably recent version of Rails, I'd recommend using Pow which will let you use subdomains without any fancy trickery.

Once you've installed it, you can add a symlink to a project to your ~/.pow directory and then access the app at app_name.dev and use subdomains, such as signin.app_name.dev as well.

Emily
  • 17,813
  • 3
  • 43
  • 47
  • Thanks for the suggestion...but this is a cloned repo with subdomain fu already being used. I don't think I can change it now. – Matthew Berman Jan 13 '12 at 22:45
  • You don't need to change anything in the app to use Pow. It's a rack app server that you run locally -- it's basically a substitute for running `script/rails` or `rails server` in a terminal. – Emily Jan 13 '12 at 22:46
  • Tried that...but when I try to open the app it just lags out...i'd like to get this method working first before trying pow again. – Matthew Berman Jan 13 '12 at 22:53