{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/til/pulls/comments/24532143","id":24532143,"diff_hunk":"@@ -0,0 +1,22 @@\n+# Binding to 0.0.0.0 in Rails\n+\n+On OS X, [boot2docker] is an installable VM host to run Docker locally (OS X\n+doesn't natively support Linux Containers). In combination with [fig], it's\n+pretty straightforward to get a Rails application running on [Docker].\n+\n+[boot2docker]: http://boot2docker.io/\n+[fig]: http://www.fig.sh/\n+[docker]: https://www.docker.com/\n+\n+To access the application, you'll visit `$(boot2docker ip):3000` (or\n+whatever port your Rails application is running on) and things should work\n+fine. However, I'd recently tried setting up Docker in a Rails app that was\n+running WEBrick and wasn't able to access the application at all. After\n+updating the command to run to [Thin], the app loaded fine!\n+\n+[thin]: http://code.macournoyer.com/thin/\n+\n+Trevor, one of my coworkers, pointed out the binding flag in WEBrick, which\n+needs to be set in order for the server to accept requests from any network\n+interface: `rails server -p 3000 -b 0.0.0.0`. In the current version of Thin","path":"docker/binding-to-0-0-0-0-in-rails.md","position":21,"original_position":21,"commit_id":"b4e9583e8b62cd709bb283861d7aab2ae8e913e9","original_commit_id":"b4e9583e8b62cd709bb283861d7aab2ae8e913e9","user":{"login":"trevororeilly","id":47136,"avatar_url":"https://avatars.githubusercontent.com/u/47136?v=3","gravatar_id":"","url":"https://api.github.com/users/trevororeilly","html_url":"https://github.com/trevororeilly","followers_url":"https://api.github.com/users/trevororeilly/followers","following_url":"https://api.github.com/users/trevororeilly/following{/other_user}","gists_url":"https://api.github.com/users/trevororeilly/gists{/gist_id}","starred_url":"https://api.github.com/users/trevororeilly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trevororeilly/subscriptions","organizations_url":"https://api.github.com/users/trevororeilly/orgs","repos_url":"https://api.github.com/users/trevororeilly/repos","events_url":"https://api.github.com/users/trevororeilly/events{/privacy}","received_events_url":"https://api.github.com/users/trevororeilly/received_events","type":"User","site_admin":false},"body":"Maybe use the longer option names just to be a bit more descriptive? \r\n\r\n`rails server --binding=0.0.0.0 --port=3000`","created_at":"2015-02-11T20:52:36Z","updated_at":"2015-02-11T20:52:36Z","html_url":"https://github.com/thoughtbot/til/pull/65#discussion_r24532143","pull_request_url":"https://api.github.com/repos/thoughtbot/til/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/til/pulls/comments/24532143"},"html":{"href":"https://github.com/thoughtbot/til/pull/65#discussion_r24532143"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/til/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/til/pulls/65","id":29123177,"html_url":"https://github.com/thoughtbot/til/pull/65","diff_url":"https://github.com/thoughtbot/til/pull/65.diff","patch_url":"https://github.com/thoughtbot/til/pull/65.patch","issue_url":"https://api.github.com/repos/thoughtbot/til/issues/65","number":65,"state":"open","locked":false,"title":"Outline network interface binding to 0.0.0.0 when running a Rails server","user":{"login":"joshuaclayton","id":1574,"avatar_url":"https://avatars.githubusercontent.com/u/1574?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuaclayton","html_url":"https://github.com/joshuaclayton","followers_url":"https://api.github.com/users/joshuaclayton/followers","following_url":"https://api.github.com/users/joshuaclayton/following{/other_user}","gists_url":"https://api.github.com/users/joshuaclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuaclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuaclayton/subscriptions","organizations_url":"https://api.github.com/users/joshuaclayton/orgs","repos_url":"https://api.github.com/users/joshuaclayton/repos","events_url":"https://api.github.com/users/joshuaclayton/events{/privacy}","received_events_url":"https://api.github.com/users/joshuaclayton/received_events","type":"User","site_admin":false},"body":"This is important as Webrick doesn't seem to do this by default and can\nbe confusing.","created_at":"2015-02-11T20:00:01Z","updated_at":"2015-02-11T20:52:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29b8b041f02bd87731752a79f7f9574ac72572f5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/til/pulls/65/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/til/pulls/65/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/til/pulls/comments/{number}","comments_url":"https://api.github.com/repos/thoughtbot/til/issues/65/comments","statuses_url":"https://api.github.com/repos/thoughtbot/til/statuses/b4e9583e8b62cd709bb283861d7aab2ae8e913e9","head":{"label":"thoughtbot:jc-binding-to-0-0-0-0","ref":"jc-binding-to-0-0-0-0","sha":"b4e9583e8b62cd709bb283861d7aab2ae8e913e9","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":29370487,"name":"til","full_name":"thoughtbot/til","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/til","description":"Today I Learned","fork":false,"url":"https://api.github.com/repos/thoughtbot/til","forks_url":"https://api.github.com/repos/thoughtbot/til/forks","keys_url":"https://api.github.com/repos/thoughtbot/til/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/til/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/til/teams","hooks_url":"https://api.github.com/repos/thoughtbot/til/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/til/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/til/events","assignees_url":"https://api.github.com/repos/thoughtbot/til/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/til/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/til/tags","blobs_url":"https://api.github.com/repos/thoughtbot/til/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/til/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/til/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/til/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/til/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/til/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/til/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/til/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/til/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/til/subscription","commits_url":"https://api.github.com/repos/thoughtbot/til/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/til/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/til/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/til/issues/comments/{number}","contents_url":"https://api.github.com/repos/thoughtbot/til/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/til/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/til/merges","archive_url":"https://api.github.com/repos/thoughtbot/til/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/til/downloads","issues_url":"https://api.github.com/repos/thoughtbot/til/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/til/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/til/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/til/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/til/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/til/releases{/id}","created_at":"2015-01-16T22:21:28Z","updated_at":"2015-02-11T19:14:36Z","pushed_at":"2015-02-11T19:59:58Z","git_url":"git://github.com/thoughtbot/til.git","ssh_url":"git@github.com:thoughtbot/til.git","clone_url":"https://github.com/thoughtbot/til.git","svn_url":"https://github.com/thoughtbot/til","homepage":null,"size":1798,"stargazers_count":2575,"watchers_count":2575,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":124,"mirror_url":null,"open_issues_count":19,"forks":124,"open_issues":19,"watchers":2575,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"44e7f4c2ac9e466aa67b000ce8ac3f85cb9ae281","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":29370487,"name":"til","full_name":"thoughtbot/til","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/til","description":"Today I Learned","fork":false,"url":"https://api.github.com/repos/thoughtbot/til","forks_url":"https://api.github.com/repos/thoughtbot/til/forks","keys_url":"https://api.github.com/repos/thoughtbot/til/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/til/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/til/teams","hooks_url":"https://api.github.com/repos/thoughtbot/til/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/til/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/til/events","assignees_url":"https://api.github.com/repos/thoughtbot/til/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/til/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/til/tags","blobs_url":"https://api.github.com/repos/thoughtbot/til/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/til/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/til/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/til/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/til/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/til/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/til/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/til/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/til/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/til/subscription","commits_url":"https://api.github.com/repos/thoughtbot/til/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/til/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/til/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/til/issues/comments/{number}","contents_url":"https://api.github.com/repos/thoughtbot/til/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/til/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/til/merges","archive_url":"https://api.github.com/repos/thoughtbot/til/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/til/downloads","issues_url":"https://api.github.com/repos/thoughtbot/til/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/til/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/til/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/til/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/til/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/til/releases{/id}","created_at":"2015-01-16T22:21:28Z","updated_at":"2015-02-11T19:14:36Z","pushed_at":"2015-02-11T19:59:58Z","git_url":"git://github.com/thoughtbot/til.git","ssh_url":"git@github.com:thoughtbot/til.git","clone_url":"https://github.com/thoughtbot/til.git","svn_url":"https://github.com/thoughtbot/til","homepage":null,"size":1798,"stargazers_count":2575,"watchers_count":2575,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":124,"mirror_url":null,"open_issues_count":19,"forks":124,"open_issues":19,"watchers":2575,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/til/pulls/65"},"html":{"href":"https://github.com/thoughtbot/til/pull/65"},"issue":{"href":"https://api.github.com/repos/thoughtbot/til/issues/65"},"comments":{"href":"https://api.github.com/repos/thoughtbot/til/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/til/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/til/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/til/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/til/statuses/b4e9583e8b62cd709bb283861d7aab2ae8e913e9"}}}}