19
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rails で subdomain を使う場合の落とし穴

Last updated at Posted at 2012-04-18

config/routes.rb で subdomain を指定するだけでは、local環境でうまくブラウザからアクセスすることが出来ない

ので、下記のように /etc/hosts (mac/linuxの場合) に追記する

127.0.0.1       subdomain.localhost.local

ちなみに・・・・

127.0.0.1       subdomain.localhost # これだとダメ

これでブラウザから subdomain.localhost.local:3000 でアクセス出来るようになる

’rails で’ というより localhost での tipsかもしれない・・・

19
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?