On 2013-Nov-21, at 04:12 , Tamara Temple <[email protected]> wrote:

> 
> On Nov 20, 2013, at 4:04 AM, Srdjan Cengic <[email protected]> wrote:
>> 
>> Far as i know, link to http://api.localhost:3000/posts should work but i get 
>> routing error: 
>> No route matches [GET] "/posts" (Same with /posts.json)
> 
> This isn’t how localhost works, at all.
> 
> If you need to set up a local subdomain for testing, you most likely will 
> need to do things like modify your /etc/hosts table, set up local DNS 
> resolvers, and the like. If you’re running on a mac, you can use pow, which 
> makes all that dead-easy.

But you could use:
        http://api.127.0.0.1.xip.io:3000/posts

See http://xip.io/ for the details, but this will resolve to the IP address 
before the .xip.io and then api will be the subdomain.

-Rob

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/9BD1A639-67DB-4C89-B098-E725D897B52C%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to